Journal Levels: Don't you think DEBUG is more subtle than TRACE?

My question arises from this question, where one of the comments suggests that the DEBUG log level is more subtle than TRACE. Looking at what TRACE and DEBUG mean in .NET, this seems to make sense because, by definition, DEBUG (as a concept) is never considered in production. This is probably why they are not used as an event type in the corporate library. On the other hand, all the other implementations that I know of (log4net, nlog, common.logging) have TRACE as a more subtle level than DEBUG. That is, an application running at the DEBUG log level will not write TRACE logs.

We need to implement our own magazine structure, and I was wondering if there are more people out there who think that DEBUG should really be the most "spam" journal level? Or do you think this is a mistake if our new structure should provide some easy-to-use acquaintance with new developers, etc.?

Thank.

+5
source share
2 answers

Mention that log4net comes from the Java world, and NLog uses a lot of its ideas from log4net - that's why Trace and Debug will be different for these frameworks, because they are not based on the idea of ​​the .NET Framework designer for logging, it is in the System namespace. Diagnostics

, Trace .NET Debug .NET, ( TRACE web.config), .

, NLog Log4Net , , , .

+4

, TRACE , DEBUG.

: PostSharp , , :

if (Log.IsTraceEnabled)
   Log.TraceFromat("Method {0} args {1}", method, string.Join(",", args));

"TRACE" , DEBUG , . , ?

+4

All Articles