Closed derhuerst closed 5 years ago
Are you referring to the Stackdriver Logging agent? It's based on fluentd
and has some log types pre-configured.
If you are running your application on Google Cloud, you can also try pino-syslog. It will transform pino log format to syslog format, which is supported by the logging agent.
This library is useful if you want to log to Stackdriver, but the application is not running on Google Cloud. Therefore it will use the API.
If these are not the case, tell me about your setup. If we can write to stdout
in a different format, we can create another version of this library that will not use the API, but write out in a different format.
Ah, then I misinterpreted the goal of this library.
Are you referring to the Stackdriver Logging agent? It's based on fluentd and has some log types pre-configured.
Yes. I didn't know its name, just that the logs of containers via Google Kubernetes Engine, Cloud Functions, etc. show up in Stackdriver anyways.
I'd like to use pino with Stackdriver-compatible logging. In many Google Cloud environments,
stdout
will appear in Stackdriver automatically, so I only need the output in the right format. This would match a major design decision behind pino: That the logging process shouldn't care about the transport.I propose a way to use
pino-stackdriver
without making calls to the Stackdriver API (for performance and separation of concerns), and withoutrequire
ing@google-cloud/logging
(for faster startup times).