not sure where to ask this I did not find a subthread for this hidden package.
I am using Unity.Logging 1.2.3 and I’ve followed the sample’s example code like so:
Log.Logger = new Unity.Logging.Logger(new LoggerConfig()
.MinimumLevel.Debug()
.OutputTemplate("{Timestamp} - {Level} - {Message}")
.WriteTo.File("Output.log", minLevel: LogLevel.Verbose)
.WriteTo.StdOut(outputTemplate: "[{Timestamp}] {Level} | {Message}{NewLine}")
);
SelfLog.SetMode(SelfLog.Mode.EnabledInUnityEngineDebugLogError);
Log.Info("********** Begin New Session **********");
Log.Error("Error with stack trace test");
Output.log and Output.log.json in the logs folder are empty 0 byte files and nothing gets logged to the Editor Console. The Editor.log in the typical appdata location does have the log value so they do get generated, though that’s not where I want them to ultimately land in a release build)
If I comment out the above Logger assignment in order to use the config default I will get a non-empty Output.log and Output.log.json with the expected values as well as see the logs in the console.
How do I set up a custom config to be able to have them generate in the console also?
Why are my custom logger config not actually generating the targeted log files? For now I want them to land in the exact same spot as the default logger config settings in …\projectname\logs\
My ultimate goal is to turn off stack trace logging for LogLevel Verbose, Debug, Info and Warning, but keep them on for Error and Fatal. How do I set up a custom logger config to achieve this?