StdioNode::subscribeTo not able to connect to RLogChannel?

13 views
Skip to first unread message

Sean

unread,
Jan 12, 2010, 5:38:00 PM1/12/10
to rlog-users
I'm trying to get rLog working in my project, so I've defined
RLOG_COMPONENT and I'm linking against the library, etc, etc, and I
put a few StdioNode subscribers in my main program:

// tell RLog the program name..
RLogInit(argc, argv);

// log to standard error
StdioNode std_err_log(STDERR_FILENO,
rlog::StdioNode::OutputColor |
rlog::StdioNode::OutputContext |
rlog::StdioNode::OutputChannel);

// capture all messages and log them to stderr
std_err_log.subscribeTo( GetGlobalChannel("warning"));
std_err_log.subscribeTo( GetGlobalChannel("error" ));

// Show debug messages on stdout
StdioNode std_out_log(STDOUT_FILENO,
rlog::StdioNode::OutputColor |
rlog::StdioNode::OutputContext |
rlog::StdioNode::OutputChannel);

std_out_log.subscribeTo( GetGlobalChannel("debug" ));

But everytime I try to connect the subscribes to a channel I get:

src/test/TestHarness.cc:36: error: no matching function for call to
‘rlog::StdioNode::subscribeTo(rlog::RLogChannel*)’
opt/include/rlog/StdioNode.h:47: note: candidates are: void
rlog::StdioNode::subscribeTo(rlog::RLogNode*)

Seems that subsribeTo takes a RLogNode*, how can I fix this?

Reply all
Reply to author
Forward
0 new messages