Why does Log4net input require changes to logging code?
See original GitHub issueAs far as I see (all?) input libraries are written in such a way that they can read from their respective inputs without requiring any changes to the existing log writing code. Only log4net input is different. Here we are required to request a logger from a specific logger repository called EventFlowRepo
. Existing log4net logging code won’t work, because it typically creates loggers from the default repository.
Why is log4net input implemented in this way? Can it be changed? Can it be used differently so that it behaves like other inputs (i.e. no changes to existing logging code are required).
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Log4net Tutorial for .NET Logging: 14 Best Practices and ...
By adopting a logging framework, it becomes easy to write your logs to different places by simply changing your configuration.
Read more >Apache log4net: Frequently Asked Questions
log4net categorizes logging into levels: DEBUG, INFO, WARN, ERROR and FATAL. The format of the log output can be easily changed by implementing...
Read more >Log4net does not write the log in the log file
I have created a simple scenario using Log4net, but it seems that my log appenders do not work because the messages are not...
Read more >log4net - Frequently Asked Questions - SourceForge
Well one of the clever features of log4net is that you can change the logging configuration while your program is running. If you...
Read more >Log4net Configuration: Logging Exactly the Way You Want It
This architecture conforms nicely to the theory of separating code from config. It gives you greater flexibility for choosing your log ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It is a little fuzzy, but I remember having issues if I did not create a named repository. I don’t think this is necessary, but I am unsure. It was just inexperience on my part I believe.
I will take a deeper look into it over the weekend, if you do not beat me to it.
It should be fairly easy to fix this. One possibility is to make the logging repository name a configuration parameter and use the value of the parameter as part of initialization Default value could be empty, which would be a hint to use the default repository.
@jeremysmith1 was there a particular reason why you used a named repository as the default for log4net input?