Overview
Features
Download
Documentation
Community
Add-Ons & Services

Logger: Channel-based log level

Please post support and help requests here.

Logger: Channel-based log level

Postby aderouineau » 30 Dec 2009, 03:24

This is the scenario I'm trying to reach:

*) Use only one logger, the root logger
*) Print all logs at or above trace/debug on the console, if enabled
*) Write all logs at or above warning in a file

But it seems that it's not currently possible. The only thing I saw is writing to multiple channels, but the level is kept the same for all of them.
aderouineau
 
Posts: 163
Joined: 18 May 2009, 17:38

Re: Logger: Channel-based log level

Postby guenter » 04 Jan 2010, 15:52

There's a Logging library in the SVN sandbox http://poco.svn.sourceforge.net/viewvc/poco/sandbox/Logging/ which defines various filter channels that allow you to filter and redirect log messages to your heart's content.
guenter
 
Posts: 1157
Joined: 11 Jul 2006, 16:27
Location: Austria

Re: Logger: Channel-based log level

Postby aderouineau » 06 Jan 2010, 19:46

How stable is it?
aderouineau
 
Posts: 163
Joined: 18 May 2009, 17:38

Re: Logger: Channel-based log level

Postby guenter » 07 Jan 2010, 18:12

I have used parts of it in a commercial project and it worked well. The only thing that hasn't been really tested is the RepetitionFilter. The other classes (PriorityFilter, SourceFilter, etc.) are not really rocket science and should do their job as expected.
guenter
 
Posts: 1157
Joined: 11 Jul 2006, 16:27
Location: Austria

Re: Logger: Channel-based log level

Postby aderouineau » 10 Jan 2010, 00:54

Would it be possible to add PriorityFilter (and thus AbstractFilter as well) to stable?

What has kept them from merging for such a long time?
aderouineau
 
Posts: 163
Joined: 18 May 2009, 17:38

Re: Logger: Channel-based log level

Postby guenter » 15 Jan 2010, 10:52

Would it be possible to add PriorityFilter (and thus AbstractFilter as well) to stable?

What has kept them from merging for such a long time?


Someone needs to invest some time to finish the testsuite, which is not quite up to standards.
Apart from that, it could be merged into 1.3.7 or the trunk.
guenter
 
Posts: 1157
Joined: 11 Jul 2006, 16:27
Location: Austria

Re: Logger: Channel-based log level

Postby mikoro » 10 Nov 2012, 18:30

I'm trying to do this with Poco 1.5.0 but it seems that there is no support for it. Can this feature be added?
mikoro
 
Posts: 5
Joined: 19 Aug 2012, 12:44

Re: Logger: Channel-based log level

Postby alex » 12 Nov 2012, 03:02

mikoro wrote:I'm trying to do this with Poco 1.5.0 but it seems that there is no support for it. Can this feature be added?

Yes, there are three ways :
1. do it yourself and contribute code back to the project (this is really easy now when we are on GitHub)
2. hire someone to do it
3. wait until someone has to scratch the same itch
alex
 
Posts: 1146
Joined: 11 Jul 2006, 16:27
Location: United_States


Return to Support

Who is online

Users browsing this forum: No registered users and 1 guest