Skip to content

SyslogChannel example for linux syslog #4228

Closed Answered by gary-metalle-rvl
gary-metalle-rvl asked this question in Q&A
Discussion options

You must be logged in to vote

It was quite easy in the end....

Note sure why open() had to be called on the newly created channel when it isn't in the POCO logging examples, but this is what was missing. Here is a full listing of a the server application sample program with the few extra bits in to make it log to the linux syslog which it will do if run as a regular command line app or as a daemon with the --daemon option:

//
// SampleServer.cpp
//
// This sample demonstrates the ServerApplication class.
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier:	BSL-1.0
//


#include "Poco/Util/ServerApplication.h"
#include "Poco/Util/Option.h"
#in…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by gary-metalle-rvl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant