0 votes
by (76.4k points)

This question was originally asked as this comment by pbisht:

new Rebex.FileLogWriter(logPath, Rebex.LogLevel.Info);

I observed Rebex.FileLogWriter opens the log file in overwrite mode, not append mode. Is it true? Can we do it in append mode or we have to make it custom?

1 Answer

+1 vote
by (76.4k points)

No, the Rebex.FileLogWriter opens the file with FileMode.Append value (along with FileAccess.Write and FileShare.ReadWrite). So, it seems that something else is deleting/overwriting the file.

No, it is not possible to adjust file creation options of the Rebex.FileLogWriter.

by (260 points)
Thank you for the response. As per my understanding, the maximum file size or threshold value for log files was not configurable earlier. Is this feature available in any version now?
by (76.4k points)
The Rebex.FileLogWriter class does not impose any file size limit. It simply writes log entries to the file specified during its construction. Any size/date rolling capabilities has to be implemented manually.

However, I am little confused now. Are you asking about logging using the Rebex.FileLogWriter class (a .NET API), or about logging in Rebex TLS Proxy (a standalone app)?

If you are asking about logging capabilities in the Rebex TLS Proxy, the settings are not configurable. Currently:

Max file size = 1GB. (size per single file, if exceeded another file is created)
File retention = 31 files.
by (260 points)
I was asking about Rebex.FileLogWriter. Thanks for your answer.
...