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
This feature idea has come from working with the NLog.Targets.Syslog target and an issue that I raised in that project (luigiberrettini/NLog.Targets.Syslog#56)
When making calls to the static InternalLogger, it is currently common to check the enabled log level before invoking the logger - particually when the information to be logged is the result of a potentially intensive operation such an ToString(), string concatination etc.
It would be useful, and provide safer / cleaner code, for the InternalLogger class to have additional methods that allow the client to provide a function that will only get invoked when the relevent log level is enabled, thus allowing optimal performance.
This has been initially discussed with @304NotModified as part of the issue mentioned above.
The text was updated successfully, but these errors were encountered:
This feature idea has come from working with the NLog.Targets.Syslog target and an issue that I raised in that project (luigiberrettini/NLog.Targets.Syslog#56)
When making calls to the static InternalLogger, it is currently common to check the enabled log level before invoking the logger - particually when the information to be logged is the result of a potentially intensive operation such an ToString(), string concatination etc.
It would be useful, and provide safer / cleaner code, for the InternalLogger class to have additional methods that allow the client to provide a function that will only get invoked when the relevent log level is enabled, thus allowing optimal performance.
This has been initially discussed with @304NotModified as part of the issue mentioned above.
The text was updated successfully, but these errors were encountered: