sockets - Log4cplus:SocketAppender日志记录服务器

标签 sockets server log4cplus

我希望更好地了解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/

相关文章:

c - 套接字在 linux 上工作但在 osx 上不工作

java - 尝试在我的服务器上运行脚本时发生错误

syslog - 如何配置 Log4cplus Syslog Appender

c++ - Visual Studio 调试控制台中的 log4cplus 日志

php - 传输端点未连接

c - Linux: fork 两次和守护进程(ise)之间的区别

c - 单元测试 UDP 套接字处理代码

java - 我的 Java 聊天服务器程序不会向每个连接的用户广播

将对象从 Android 发送到 Java 服务器时,ObjectInputStream.readObject() 上出现 Java.lang.ClassNotFoundException

c++ - 如何压缩备份日志文件?