Page 1 of 1

Log file

Posted: Thu Aug 29, 2019 1:19 am
by htin
any other way to use file logging. I am trying to use

Code: Select all

LogManager.SetLoggerFactory(new FileLogFactory(logfileName, LogLevel.Info));
but log files gets too big and I can not find any config to limit log file size. what I want to achieve is to log into a new log file when the existing log file reaches certain size. the existing log file is renamed according to the time. just like any other logging utils.

Re: Log file

Posted: Thu Sep 05, 2019 9:38 pm
by alt
You should use any logging framework for this. All you need to do is to implement ILogFactory and ILog interfaces.
https://docs.inetlab.com/smpp/v2/articles/tracing.html

In zip archive in Samples folder you can find LoggingWithNLog project.