简体   繁体   English

Package log4r-mongoDB集成

[英]Package log4r-mongoDB integration

I explored the log4r package and found that we have console and file appenders.我探索了 log4r package,发现我们有控制台和文件附加程序。 I am looking for pushing the logs to a mongoDB database.我正在寻找将日志推送到 mongoDB 数据库。 I am unable to find any way in pushing the logs to mongoDB, do we have any appender for the same.我无法找到将日志推送到 mongoDB 的任何方法,我们是否有相同的附加程序。

TIA TIA

You can try the mongoimport tool你可以试试mongoimport工具

If you do not specify a file (option --file= ), mongoimport reads data from standard input (eg "stdin").如果您没有指定文件(选项--file= ),mongoimport 从标准输入(例如“stdin”)读取数据。

Or write logs into a temporary file and use mongoimport to import it.或者将日志写入临时文件并使用 mongoimport 导入。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM