i’m using first the unity logging package.
and then i did sink log to file with rolling,
but, it is always rewrite file. so when i execute my built file, be deleted all past logs in a file had same name.
i cannot the application close and relaunch after while it’s running.
then all past logs will be disappeared.
the log must be remain in any circumstances. isn’t it?
and, i set the rolling threshold time span to a day, but the log file created all the minute.
How do I enable logs to be appended to a file?
how can i set the rolling by a day?
It seems both FileOperationsBaselib.OpenFile() and FileRollingLogic.CreateFileStream() overwrite the current file.
// OpenFile() uses the CreateAlways flag
var result = Binding.Baselib_FileIO_SyncOpen(absFilePath.GetUnsafePtr(), Binding.Baselib_FileIO_OpenFlags.CreateAlways | Binding.Baselib_FileIO_OpenFlags.Write, &error).handle;
...
// CreateFileStream() sets offset to 0
m_State->Offset = 0;
Perhaps the best way for us to handle this is to back up existing log files upon App start. Just need to do so before your own Log.Logger = new Logger();
Can someone (from Unity) jump in here? Is this the intended behavior? I came across it just now myself, and I am bewildered.