Join 34,000+ subscribers and receive articles from our blog about software quality, testing, QA and security.
 

Feature Request


#1

noticed in a couple of other posting that you take feature requests, so here is mine.

I have situations where I need to turn off and on logging in different modules in the same executable. The log levels really do not allow me todo this. I would like to be able to define a log group for a log message and turn the logging off and on of that group. this would also work with the log level so I could turn loggin on in “Section A” at a log level of “Verbose”. while have loggin on in “Section B” at a log level of “Error”.

If makeing the log levels dependent on the section is to much, just being able to turn on and off loggin in a section would be ok.


#2

Hello Tim,

Grouping messages and turning these groups on and off is already possible. To do this, you can use different so called sessions for your modules. New sessions can be created as follows:

/* C# */ Session a = SiAuto.Si.AddSession("Module A"); Session b = SiAuto.Si.AddSession("Module B");

/* Java */ Session a = SiAuto.si.addSession("Module A"); Session b = SiAuto.si.addSession("Module B");

[code]{ Delphi }
var
A, B: TSiSession;

A := Si.AddSession(‘Module A’);
B := Si.AddSession(‘Module B’);[/code]

Session can be turned off with the Active property (setActive/isActive methods in Java). Different log levels for sessions are currently not supported (all sessions use the log level of the parent SmartInspect object). But this is something that is already on our TODO list and planned for a future release. Also planned is to add configuration file support for sessions, i.e. loading the session properties (color, active status etc.) from a file similar to the LoadConfiguration method of the SmartInspect class.