Hi all,
Every time I restart my app, my log file gets wiped. I cannot imagine that this is the intended behavior of the com.unity.logging package, so I apologize if I have made a silly error somehow.
Code for initializing logger:
private Logger _logger;
private void Start()
{
_logger = new LoggerConfig()
.OutputTemplate("{Timestamp} - {Message}")
.WriteTo.File(Path.Combine(Application.persistentDataPath, "exercise_log.txt"))
.CaptureStacktrace(false)
.CreateLogger();
}
Code for using logger:
Log.To(_logger).Info("{action} -> {exerciseName} ({location}).", action, exerciseName, location);