2
winston.info('Hello again distributed logs', { app: 'test', sid: 1 })
pino.info('Hello again distributed logs', { app: 'test', sid: 1 })
출력 :콘솔에 JSON을 기록하고 CloudWatch 로그를 가져 오는 방법이 올바른 메타 데이터를 선택합니까?
{"app":"test","sid":1,"level":"info","message":"Hello again distributed logs","timestamp":"2017-02-16T03:34:06.186Z"}
{"pid":4269,"hostname":"Macchiato.local","level":30,"time":1487216046197,"msg":"Hello again distributed logs {\"app\":\"test\",\"sid\":1}","v":1}
내가 픽업 컨테이너 표준 출력으로 Fluentd에 데몬을 가지고 CloudWatch를로 보내주십시오. 위의 예에서
, cloudwatchlogs는 pino에서 제대로 메타 데이터를 검색 할 수 있습니다와 나는 윈스턴 콘솔은 그런 식으로 작동하지 않습니다 그러나이{$.app = "test"}
같은 로그를 조회 할 수 있으며 모든 log
에 밀어있어 속성.
누구든지이 문제를 해결하는 방법을 알고 있습니다. 윈스턴 콘솔에 json: true
과 stringify: true