question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

rollingInterval and rollOnFileSizeLimit

See original GitHub issue

I have given <add key="serilog:write-to:RollingFile.rollOnFileSizeLimit" value="true" /> and <add key="serilog:write-to:RollingFile.rollingInterval" value="RollingInterval.Day" />

and to check if log files are created like log.txt log_001.txt log_002.txt

I have given

<add key="serilog:write-to:RollingFile.fileSizeLimitBytes " value="200" />

But new rolling log files are not created

I have referred https://github.com/serilog/serilog-sinks-file

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
ranjan-2209commented, May 15, 2019

@nblumhardt Thanks, I solved it. But, when I was referring Wiki, I could not find it.

0reactions
nblumhardtcommented, May 15, 2019

@ranjan-ranjan I think you need:

<add key="serilog:write-to:File.rollingInterval" value="Day" />

HTH!

Read more comments on GitHub >

github_iconTop Results From Across the Web

c# - Serilog `rollOnFileSizeLimit` doesn't work with ...
I downloaded and debugged with the Serilog.Settings.Configuration source code, and found that I made a stupid mistake here.
Read more >
Write Serilog events to files in text and JSON formats ...
Write Serilog events to files in text and JSON formats, ... Specifying both rollingInterval and rollOnFileSizeLimit will cause both policies to be applied, ......
Read more >
Serilog Logging to sink
File( path: "log.txt", rollingInterval: RollingInterval.Day, fileSizeLimitBytes: null, rollOnFileSizeLimit: true, ) .CreateLogger();. appsettings.json.
Read more >
Configure the log file size
xConnect automatically creates new log files when it reaches the file size limit. To configure the maximum size of log files: Open the...
Read more >
How to Configure Rolling File Logging With Serilog
RollOnFileSizeLimit. RollingInterval. This policy specifies the time interval after which a new log file should be created. Available options ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found