Skip to content

Commit

Permalink
Make a new log file each time
Browse files Browse the repository at this point in the history
  • Loading branch information
DrMeepso committed Dec 5, 2024
1 parent 359b488 commit efbda35
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Cove/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,12 @@ limitations under the License.
using Steamworks;
using Serilog;


long epoch = new DateTimeOffset(DateTime.UtcNow).ToUnixTimeSeconds();

var serverLogger = new LoggerConfiguration()
.WriteTo.Console()
.WriteTo.File("logs/log-.txt", rollingInterval: RollingInterval.Day) // Daily rolling logs
.WriteTo.File($"logs/log-{epoch}.txt") // Daily rolling logs
.CreateLogger();

//Console.SetOut(new SerilogTextWriter(serverLogger));
Expand Down

0 comments on commit efbda35

Please sign in to comment.