Skip to content
This repository has been archived by the owner on Jul 8, 2024. It is now read-only.

Overloaded RollingFileAlternate with a prefix for log file name. #33

Merged
merged 1 commit into from
Apr 27, 2017

Conversation

pradeepneo
Copy link
Contributor

Added a overloaded extension method RollingFileAlternate to pass a prefix for log file names.
The prefix is passed along to the AlternateRollingFileSink which will be used while creating the name for log file. If the prefix parameter is not passed to RollingFileAlternate, it will create the file names as earlier and the original behavior is not modified.
In case, if we need to have specific loggers configured to have specific events, this will be useful as it lets to specify prefix for log files, there by making them distinguishable from each other.

@vadimkhm
Copy link

vadimkhm commented Feb 8, 2017

Nice, Thanks!

@dhjon
Copy link

dhjon commented Feb 9, 2017

Much needed feature, thank you!

@vadimkhm
Copy link

Sorry do you plan merge this to master? I cannot get this functionality in version 2.0.7.
Thanks,
Vadim

@pradeepneo
Copy link
Contributor Author

@vadimkhm I am waiting for the pull request to be reviewed and merged by @AndyWardle. I guess it might make it to a later version.

@vadimkhm
Copy link

@pradeepneo, @AndyWardle Ok thanks a lot!

@vadimkhm
Copy link

vadimkhm commented Apr 7, 2017

guys any news for merging this?

@rpiesnikowski
Copy link

What about this pull request ? @AndyWardle could you look and approve if code is good?

@AndyWardle AndyWardle merged commit 942bd96 into BedeGaming:dev Apr 27, 2017
@AndyWardle
Copy link
Contributor

This is now in version 2.0.8 onwards

@vadimkhm
Copy link

vadimkhm commented May 4, 2017

Thanks!

@cocowalla
Copy link

@AndyWardle & @pradeepneo, there's a bit of a problem with Serilog.Sinks.RollingFileAlternate.LoggerConfigurationExtensions - you can't set a log prefix and specify an ITextFormatter at the same time. I just opened issue #39 for this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants