我希望更好地了解Log4cplus SocketAppender关于接收此追加事件的日志服务器的工作方式。
我阅读了loggingserver和socketappender的Log4cplus src代码,很高兴得到澄清:
SocketAppender可以仅将事件发送到Log4cplus日志记录服务器,而不发送给其他任何服务器吗?
如果是这样的话:这是否意味着如果我要将日志消息发送到远程计算机,那么该计算机必须安装有Log4cplus lib?
我还想知道-此Log4cplus日志记录服务器是否作为服务运行?它是否需要特殊的配置和预设置才能使用?
最佳答案
Can the SocketAppender only send events to the Log4cplus logging server, and not to any other server?
是的,是的。
does it mean that if I want to send log messages to remote machine, that machine must be installed with the Log4cplus lib?
好吧,有点。如果只想使用
SocketAppender
,则必须使用日志记录服务器。您也可以使用SysLogAppender
并使用它发送到远程服务器。显然,您必须拥有syslog服务,并允许从其中接收来自网络的信息。您也可以编写自己的自定义附加程序,将事件发送到所需的任何服务器。I would also like to know- does this Log4cplus logging-server run as a service?
不,这是一个监听套接字的简单可执行文件。
and does it require special configuration and pre-setup in order to use it?
它需要配置文件,以便知道在何处记录事件。
关于sockets - Log4cplus:SocketAppender日志记录服务器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53232412/