简体   繁体   中英

Is it possible to output logs in JSON format for graphql-yoga?

I use graphql-yoga and I'd like the format of my logs to be JSON. How can I do it?

The current state is the following:

$ kubectl logs ...
(node:21) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing ...

您不能使用kubectl更改日志格式,但是可以在容器运行时中更改日志记录驱动程序,例如docker

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM