Log4X 用于流量控制
我在一个项目中,我的同事想要使用 log4cpp、log4php 或 log4j 进行流量控制,即:他们想要记录内容、解析它,然后根据该信息进行流量控制。
我告诉他们 log4X 应该只用于记录、报告错误和运行时信息。
我如何说服他们不要使用 log4cpp 或 log4php 或任何 log4x 进行流量控制?
或者你认为这没有什么问题?
I m in a project which my co-workers want to use log4cpp, log4php or log4j for flow control, ie: they want to log things, parse it and then flow control based on that information.
I told them that log4X should only be used to log, report errors and run time information.
How can I convince them not to use log4cpp or log4php or any log4x for flow control?
or do you think there is nothing wrong with this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
听起来像是一个使用错误工具完成工作的典型案例。有很多方法可以进行流量控制,甚至整个服务器都可以用于此目的。 Mule、IBM Message Broker 等。正如你所说,LogX 用于日志记录。尝试将消息流、执行或任何基于记录器解析输出的概念到目前为止是错误的,我什至无法开始弄清楚为什么有人会提出这样的坏主意,更不用说采用它了。而且搞砸的方法也有很多。如果不使用他们的日志框架,不要介意他们打算如何进行真正的日志记录。
IT 人员经常做出这样的决定,这一直让我感到惊讶。
Sounds like a classic case of using the wrong tool for the job. There are many ways to do flow control and even whole servers for that purpose. Mule, IBM Message Broker to name a couple. As you say, LogX is for logging. The concept of trying to base the flow of messages, execution or whatever on the parsed output of a logger is so far wrong I cannot even begin to figure out why anyone would suggest such as bad idea, never mind adopt it. And there are so many ways to screw it up too. Never mind the fact of how do they intend to do real logging if their logging framework is not being used for it.
It never ceases to amaze me how often people in IT manage to make such decisions.