Closed jasonthomas closed 6 years ago
This is high-ish priority. I'm putting it in the London Work Week milestone but anyone should feel free to grab it before then.
We need to do this if we want to see logs in the [new Kibana](https://amo-kibana.prod.mozaws.net/_plugin/kibana/app/kibana#/discover?_g=()&_a=(columns:!(_source),index:'amo*',interval:auto,query:(match_all:()),sort:!(Timestamp,desc))). The old one is still active but won't be around for much longer.
I have a PR for switching to pino
(#5826) and a pino transport almost ready :)
Mozlog is a no-go however... It is a complete logger that leverages an older logger (intel
) without a way to use their formatter...
See: https://github.com/willdurand/pino-mozlog (WIP/quick & dirty)
To try it:
cd pino-mozlog
yarn && yarn link
cd addons-frontend
yarn link pino-mozlog && yarn
diff --git a/package.json b/package.json
index 180016305..9546d0829 100644
--- a/package.json
+++ b/package.json
@@ -95,7 +95,7 @@
}
},
"start-dev": {
- "command": "npm run clean && concurrently --kill-others 'npm run webpack-dev-server' 'node bin/server.js | pino'",
+ "command": "npm run clean && concurrently --kill-others 'npm run webpack-dev-server' 'node bin/server.js | pino-mozlog'",
"env": {
"ENABLE_PIPING": "true",
"NODE_ENV": "development",
@@ -104,7 +104,7 @@
}
},
"start-dev-proxy": {
- "command": "npm run clean && concurrently --kill-others 'npm run webpack-dev-server' 'node bin/server.js | pino' 'node bin/proxy.js | pino'",
+ "command": "npm run clean && concurrently --kill-others 'npm run webpack-dev-server' 'node bin/server.js | pino-mozlog' 'node bin/proxy.js | pino-mozlog --type proxy'",
"env": {
"ENABLE_PIPING": "true",
"NODE_ENV": "development",
Now, start yarn amo:dev
and you should see the mozlog logs.
https://wiki.mozilla.org/Firefox/Services/Logging contains a description about the mozlog format. Switching to mozlog will help get addons-frontend hooked up to Logging 2.0 https://mana.mozilla.org/wiki/display/SVCOPS/Logging+2.0