Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Are there any suggested ways for naming loggers?

loggers naming suggested
0
10 Posted

Are there any suggested ways for naming loggers?

0

Yes, there are. You can name logging loggers by locality. It turns out that instantiating a logger in each class, with the logger name equal to the fully-qualified name of the class, is a useful and straightforward approach of defining loggers. This approach has many benefits: • It is very simple to implement. • It is very simple to explain to new developers. • It automatically mirrors your application’s own modular design. • It can be further refined at will. • Printing the logger automatically gives information on the locality of the log statement. However, this is not the only way for naming loggers. A common alternative is to name loggers by functional areas. For example, the “database” logger, “remoting” logger, “security” logger, or the “XML” logger. You may choose to name loggers by functionality and subcategorize by locality, as in “DATABASE.MyApp.MyClass” or “DATABASE.MyApp.MyModule.MyOtherClass”. You are totally free in choosing the names of your loggers.

0

Yes, there are. You can name logging loggers by locality. It turns out that instantiating a logger in each class, with the logger name equal to the fully-qualified name of the class, is a useful and straightforward approach of defining loggers. This approach has many benefits: • It is very simple to implement. • It is very simple to explain to new developers. • It automatically mirrors your application’s own modular design. • It can be further refined at will. • Printing the logger automatically gives information on the locality of the log statement. However, this is not the only way for naming loggers. A common alternative is to name loggers by functional areas. For example, the “database” logger, “remoting” logger, “security” logger, or the “XML” logger. You may choose to name loggers by functionality and subcategorize by locality, as in “DATABASE.MyApp.MyClass” or “DATABASE.MyApp.MyModule.MyOtherClass”. You are totally free in choosing the names of your loggers. The log4net package

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.