Andrew's Digital Garden

12 Factor: 11. Logs

Treat logs as event streams

Logs provide visibility into the behaviour of a running app. They have no fixed beginning or end, but constantly flow while the app is running.

A twelve-factor app never concerns itself with routing or storage of its output stream. It should not attempt to write or manage logfiles. Instead it should write its event stream, unbuffered, to stdout.

In different deploys, this stream can be routed to one or more final destinations for viewing. This could be routed to a file, another app, a third party-tool, etc.

[[12factor]] [[architecture]] [[infrastructure]] [[logs]] [[ops]]

12 Factor: 11. Logs