将 log4j 输出写入现有文件
是否可以将 log4j 输出附加到现有文件?例如,定义一个 FileAppender 日志文件,我们是否可以指定一个已被其他进程使用的日志文件进行日志记录,以便将 log4j 输出附加到它。
此查询特定于 Windows Server 2008。
谢谢 诺曼 A.
Is possible to append log4j output to an existing file? For example, defining a FileAppender log file, can we specify a log file that is already in use by other process for its logging, so the log4j output is appended to it.
This query is particular to Windows Server 2008.
Thanks
Noman A.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以定义新的 log4j 附加程序并将操作指定为“附加”的日志文件
You can define new log4j appender and specify the log file with action as "Append"