You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by GitBox <gi...@apache.org> on 2018/11/22 07:49:08 UTC

[GitHub] dpsenner commented on issue #29: Parameterless LogManager.GetLogger

dpsenner commented on issue #29: Parameterless LogManager.GetLogger
URL: https://github.com/apache/logging-log4net/pull/29#issuecomment-440941624
 
 
   Hi hanabi,
   
   thanks for your contribution. While your short form looks handy, it also adds a public api that relies on examining the call stack to guess a logger name. People could argue that they would like to guess the logger name from the next outer scope. Therefore I wonder whether another solution could satisfy your needs. For instance, I usually write this such as:
   
   ```csharp
   private static readonly ILog logger = LogManager.GetLogger(typeof(ContainingType));
   ```
   
   and further automate that line of code with a template in visual studio.
   
   Best regards,
   Dominik

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services