Overview
Features
Download
Documentation
Community
Add-Ons & Services

Adding a new channel for remote (socket) logging

Please post support and help requests here.

Adding a new channel for remote (socket) logging

Postby bholdsworth » 14 Jan 2010, 00:58

Hi All.

I am trying to setup my Poco server application to send log events to a remote log viewing console using a StreamSocket. I created a descendent of Channel called "SimpleSocketChannel" that uses msg.getText(), and streams that data to a socket in its log() member. It compiles and links fine with my app. I added it local to my application code, not in the Poco code hierarchy.

The problem is I cannot figure out how to make this new Channel available through the Logger configuration system. If I try to reference "SimpleSocketChannel" in my app's config file, the app aborts immediately with a console message:
"Not found: SimpleSocketChannel"

I searched through the Poco code hoping to find some sort of "registry" for these defined channel classes, but did not find any. Are the available channel classes discovered at run-time? If so, is it only looking in the Foundation lib? That would be bad, since my Channel depends on Poco::Net.

Grateful for any guidance...
Thanks.
bholdsworth
 
Posts: 7
Joined: 17 Dec 2009, 00:09

Re: Adding a new channel for remote (socket) logging

Postby WittrockJ » 14 Jan 2010, 01:53

Check out the documentation for the LoggingFactory class (foundation lib).

You should be able to use the registerChannelClass() method to register your new channel.

-Wittrock
WittrockJ
 
Posts: 5
Joined: 07 May 2009, 16:15

Re: Adding a new channel for remote (socket) logging

Postby bholdsworth » 15 Jan 2010, 00:01

Thanks. registerChannelClass() is the piece I was missing.
bholdsworth
 
Posts: 7
Joined: 17 Dec 2009, 00:09


Return to Support

Who is online

Users browsing this forum: bgolenko and 4 guests