How to log - a way to apply 12 factors

I want to know how best to log my node application. I read recommendations for 12 factors when using https://12factor.net/logs , and he argues that logs should always be sent to stdout. Cool, but then how will someone manage magazines in production? Is there an application that draws everything that is sent to stdout? Also, am I recommended to record only stdout, not stderr? I would be grateful for the prospect in this matter.

+4
source share
2 answers

Is there an application that draws everything that is sent to stdout?

, , , . , bash node app.js > app.out. stdout stderr node app.js 2> app.err 1> app.out.

- , , .

stdout , , , , . , , , . , , , . , , , .

12- " " " ". , , , - . , , , . , , , . stdout , , .

+2

, : "[-] stdout".

, :

a) , -

b) "" , ""

c) logger stdout, stderr, , , , .. .., .

, stdout - "logger" POOR.

:

https://blog.risingstack.com/node-js-logging-tutorial/

0

Source: https://habr.com/ru/post/1677126/


All Articles