lraulea commented on issue #234:
URL:
https://github.com/apache/logging-log4net/issues/234#issuecomment-2764491439
Below the configuration data
Still TODO: set a breakpoint in RollOverTime()
```
class CustomRollingFileAppender : RollingFileAppender
{
public CustomRollingFileAppender(CustomAppender customAppender)
{
//create new PaternLayout, .AddConverter, .ActivateOptions
Name = customAppender.Name;
AppendToFile = true;
File = customAppender.File;
DatePattern = "'-'yyyyMMdd"; //for testing = "'-'yyyyMMddHH"
PreserveLogFileNameExtension = false;
CountDirection = 0;
Layout = patternLayout;
ImmediateFlush = true;
MaxSizeRollBackups = -1; //managed outside log4net
MaximumFileSize = "256MB";
RollingStyle = RollingMode.Composite;
StaticLogFileName = false;
}
protected override void RollFile(string fromFile, string toFile)
{
base.RollFile(fromFile, toFile);
//log to a logfile1 fromFile param
//logfile1 empty
}
protected override void RollOverRenameFiles(string baseFileName)
{
base.RollOverRenameFiles(baseFileName);
//log to logfile2 baseFileName param
//logfile2 only contains entries from rollover on size
}
protected override void AdjustFileBeforeAppend()
{
var currentFile = File;
base.AdjustFileBeforeAppend();
if (!currentFile.Equals(File))
{
//log to logfile3 currentFile, File params
//logfile3 only contains entries from rollover on size
//AdjustFileBeforeAppend called on rollover on time, but
currentFile == File
}
}
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]