Create settings form for svyLogManager

Questions and answers on designing your Servoy solutions, database modelling and other 'how do I do this' that don't fit in any of the other categories

Create settings form for svyLogManager

Postby jdbruijn » Wed Jul 04, 2018 11:12 am

Recently I have started to use the svyLogManager for logging in my solution, instead of using application.output.
I am using the following code to create the logger instances (each is created in its own scope):
var log_mod1 = scopes.logger.getLogger('myApp.mod1');
var log_mod2 = scopes.logger.getLogger('myApp.mod2');
var log_import = scopes.logger.getLogger('myApp.mod2.import');

And next I can set the logging level for each logger:
scopes.logger.getLogger('myApp').setLevel('error');
scopes.logger.getLogger('myApp.mod2').setLevel('debug');
scopes.logger.getLogger('myApp.mod2.import').setLevel('trace');

Next, I want to have a settings form where I can select each logger to set the correct logging level. I think I need to add this to the getLogger function to generate some sort of structure that can be used for this (maybe a tree ?) Has anyone done this before for the svyLogManager? Or any general ideas I can use for this?
Jos de Bruijn
Welcome CCS
Servoy Certified Developer
Image
jdbruijn
 
Posts: 466
Joined: Sun Apr 11, 2010 6:34 pm

Return to Programming with Servoy

Who is online

Users browsing this forum: No registered users and 5 guests

cron