1
Livid MOD OP |
2
Livid MOD OP 其实距离这份来自 Heroku 的 best practice 的最后更新时间已经过去两年多了,我很好奇的是,在 2014 年,是否有什么新的更好的方法论呢?
|
3
yuankui 2014-11-05 03:49:00 +08:00 via iPad
干货!
|
4
arbipher 2014-11-06 15:08:50 +08:00
http://12factor.net/logs 里面提到:
A twelve-factor app never concerns itself with routing or storage of its **output stream**. It should not attempt to write to or manage logfiles. Instead, each running process writes its event stream, unbuffered, to stdout. In staging or production deploys, each process’ stream will be captured by the execution environment, collated together with all other streams from the app, and routed to one or more final destinations for viewing and long-term archival. 这个意思是"我的代码中所有的Log.debug, Log.error都替换成print吗?",感觉这样很别扭啊。。。 |
5
arbipher 2014-11-07 01:35:07 +08:00
自问自答了。。。
[Logs Are Streams, Not Files](http://adam.herokuapp.com/past/2011/4/1/logs_are_streams_not_files/) 这篇博客算是解释了这个问题。 “要说找到也不能说完全没有找到;概念上是理解了的样子” |