You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm working on the test agent, which is very hard to debug. So I rely a lot on logging.
What I find - have always found - about adding log entries is that debug log files get bigger and bigger (obviously) even though much of what is in them has nothing to do with the particular area where I'm debugging.
Ideally, it would be nice to specify at the command-line or in a config file what areas I'm interested in. I've done that in other apps. But for this issue, I'm thinking about something simpler, which will help us engine developers even though it's not so useful for users.
Suppose we treat the initialized internal trace level as a default and simply allow each logger, which is created in the code at the start of a file, to specify its own level. So this line...
var log = InternalTrace.GetLogger(typeof(SomeClass));
would continue to get the default level set at startup, while this one...
var log = InternalTrace.GetDebugLogger(typeof(SomeClass));
would give you a debug logger to use within the file.
An alternate syntax would be to overload give GetLogger an optional trace level argument, but that requires more typing. :_)
@nunit/engine-team I think this would be very easy to implement. Would it be helpful?
The text was updated successfully, but these errors were encountered:
No comments on this yet but I felt I really needed it in some of the work I was doing recently so I'm making it an Enhancement and we can review the idea as a PR.
I don't have a strong opinion about this, as I've not been doing a lot of debugging of the console and/or agents, but if it helps you and is easy to implement, then I think it is fine to add.
I'm working on the test agent, which is very hard to debug. So I rely a lot on logging.
What I find - have always found - about adding log entries is that debug log files get bigger and bigger (obviously) even though much of what is in them has nothing to do with the particular area where I'm debugging.
Ideally, it would be nice to specify at the command-line or in a config file what areas I'm interested in. I've done that in other apps. But for this issue, I'm thinking about something simpler, which will help us engine developers even though it's not so useful for users.
Suppose we treat the initialized internal trace level as a default and simply allow each logger, which is created in the code at the start of a file, to specify its own level. So this line...
would continue to get the default level set at startup, while this one...
would give you a debug logger to use within the file.
An alternate syntax would be to overload give
GetLogger
an optional trace level argument, but that requires more typing. :_)@nunit/engine-team I think this would be very easy to implement. Would it be helpful?
The text was updated successfully, but these errors were encountered: