Web forum is in read-only mode. Login as active registered customer for write access
  Forum Search   New Posts New Posts

TMSLogger Outputformats and global logginglevel

 Post Reply Post Reply
Author
Ronald Janse View Drop Down
Senior Member
Senior Member
Avatar

Joined: 20 Aug 2015
Posts: 265
Post Options Post Options   Quote Ronald Janse Quote  Post ReplyReply Direct Link To This Post Topic: TMSLogger Outputformats and global logginglevel
    Posted: 05 Feb 2016 at 10:37am
I would like to have the opportunity to set a different format for different outputs. E.g. when using a textfile, i use a '| ' to seperate the fields. I don't like that in HTML or CSV output.

A second request would be a global logginglevel. The level will be set when initialising the logging (say: 0=low, 1=medium, 2=high etc.) and different logging statement can get a logginglevel. This way one can include very detailed logging if necessary (in debug mode or some extreme debuggingmode), and can switch it off when it's not necessary. We like to have the opportunity to provide our customers with a version that has more debugging to find local errors that are difficult to track.
Back to Top
Pieter Scheldeman View Drop Down
TMS Support
TMS Support
Avatar

Joined: 18 May 2010
Posts: 3298
Post Options Post Options   Quote Pieter Scheldeman Quote  Post ReplyReply Direct Link To This Post Posted: 05 Feb 2016 at 11:51am
Hi, 

To solve the first issue, you could create multiple instances of the TMSLogger, have one outputhandler for each instance and set the OutputFormats property based on the output handler of your choice.

The global log level is already available through the LogLevelFilters property. This way you can control which log levels are logged. 

Kind Regards, 
Pieter
Back to Top
Ronald Janse View Drop Down
Senior Member
Senior Member
Avatar

Joined: 20 Aug 2015
Posts: 265
Post Options Post Options   Quote Ronald Janse Quote  Post ReplyReply Direct Link To This Post Posted: 05 Feb 2016 at 12:03pm
The first suggestion could work, I think. I'll try that.

The second one is not enough for me. I know that I can filter out types of information, but I would like to have a level on top of that. The extra level could give me the opportunity to log several types of Debug information, for instance.
I can solve it myself, if I can set a global value. Just an ID (string or integer, doesn't matter), like Delphi's Tag-value would do the trick. But even that is not available it seems.
Back to Top
Pieter Scheldeman View Drop Down
TMS Support
TMS Support
Avatar

Joined: 18 May 2010
Posts: 3298
Post Options Post Options   Quote Pieter Scheldeman Quote  Post ReplyReply Direct Link To This Post Posted: 05 Feb 2016 at 12:07pm
You could create 2 debug loggers, one for normal debug levels and the second for detailed debug levels. With the active property you can control which one is active. They could both point to the same output handler. 
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down