Livid
408.15D
546.78D
V2EX  ›  DevOps

The Twelve-Factor App

  •  1
     
  •   Livid ·
    PRO
    · Nov 4, 2014 · 5580 views
    This topic created in 4397 days ago, the information mentioned may be changed or developed.
    http://12factor.net/

    Heroku 关于架构设计和运维的知识总结。

    可以直接导入到 iBook 中阅读 http://12factor.net/12factor.epub
    5 replies  •  2014-11-07 01:35:07 +08:00
    Livid
    Livid
    MOD
    OP
    PRO
    Nov 4, 2014
    1
    Livid
    Livid
    MOD
    OP
    PRO
    Nov 4, 2014
    2
    其实距离这份来自 Heroku 的 best practice 的最后更新时间已经过去两年多了,我很好奇的是,在 2014 年,是否有什么新的更好的方法论呢?
    yuankui
    yuankui
    Nov 5, 2014 via iPad
    3
    干货!
    arbipher
    arbipher
    Nov 6, 2014
    4
    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吗?",感觉这样很别扭啊。。。
    arbipher
    arbipher
    Nov 7, 2014
    5
    自问自答了。。。
    [Logs Are Streams, Not Files](http://adam.herokuapp.com/past/2011/4/1/logs_are_streams_not_files/) 这篇博客算是解释了这个问题。

    “要说找到也不能说完全没有找到;概念上是理解了的样子”
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2541 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 00:36 · PVG 08:36 · LAX 16:36 · JFK 19:36
    ♥ Do have faith in what you're doing.