Gibraltar Support

Start a new topic
Planned

Configurable logging levels to record

We currently have quite a "chatty" log implemented in NLog that we control using different rules to configure what level to record.

There doesn't appear to be an equivalent in Loupe to only log Information messages and above for example.


Is the intent that absolutely everything is always logged or should Loupe be used in combination with NLog if we want that kind of functionality? All our components would then use NLog loggers that would then feed in to the Loupe target?


It would be good if this functionality was integrated in to Loupe as a configuration option at the start of the session.


We're working to incorporate some nice ways of doing this in Loupe Agent Version 5.  We are notionally planning on shipping Version 5 later this year.


1 person likes this

Note that I adhere to the log everything and filter later philosophy. I'd rather have the information and not use it, than struggle because I don't have it.


However if some filter at the source is implemented, Anthony's suggestion of a simple System.Diagnostic.TraceLevel property to filter out what is outputted at the AgentConfiguration level would be very convenient.


Error = Errors only

Warning = Errors + Warnings

Info = Errors + Warnings + Infos

Verbose = Current behavior


This would be practical because sometime the 'chatty' output is coming from 3rd party components where changing the Log method is impossible. Being a configuration option means we could easily change this from command switches or app.config entries.

The general philosophy in Loupe is "record everything, filter in the viewer" because you can't go back to production yesterday and turn on logging after a problem's happened.


That said, there is a middle ground here where some logging implementations can just be too loud to want to tote that data around no matter how efficiently we might do it.   My instinctive thought is to allow either disabling Verbose logging for all messages or possibly adding another log method (e.g. "Debug" or something) which is recorded as verbose but can be enabled/disabled.  Thoughts?

Login to post a comment