码迷,mamicode.com
首页 > 其他好文 > 详细

日志应该满足的要求

时间:2017-05-03 23:58:34      阅读:326      评论:0      收藏:0      [点我收藏+]

标签:格式化   man   中文   error   mat   deb   情况   rest   info   

中文:

 

  • 时间戳-  表示事件何时发生
  • 格式化- 日志行应该容易让人理解,同时便于程序解析
  • 日志地点- 它应该是标准输出和错误,应用不需要关心日志的地点
  • 日志等级- 日志事件应该有不同的服务等级,大部分情况下我们比较关心debug 和info 级别的事件

 

 

英文:

 

  • timestamps - it is crucial to know which event happened when,
  • formatting - log lines must be easily understandable by humans, and straightforward to parse for applications,
  • log destination - it should be always the standard output/error, applications should not concern themselves with log routing,
  • log levels - log events have different severity levels, in most cases, you won‘t be interested in debug or info level events.

日志应该满足的要求

标签:格式化   man   中文   error   mat   deb   情况   rest   info   

原文地址:http://www.cnblogs.com/mliudong/p/6804444.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!