Repository URL to install this package:
|
Version:
0.0.1-9ecc40928b9b22 ▾
|
| app |
| Jenkinsfile |
| package.json |
| README.md |
A small utility tool to parse and print our JSON logs into a more human readable format. Works with spring-boot microservices in Doodle ecosystem.
node installed and you have at least read access to Doodle's NPM repository. The instructions are here.npm i -g @doodle/dlogThe tool consumers JSON from the instandard input, formats it and prints the message in the standard output. So all you need to do is to pipe the output from k logs to dlog:
$ k logs -f <POD_NAME> | dlog
You cann simplify things by adding an alias in your bash, for example, for ZSH, you need to add the following lines to your .zshrc file:
k_dlogs() {
k logs -f $1 | dlog
}
alias kdlog="k_dlogs"
Don't forget to source ~/.zshrc after editing it.
Then you can call if from anywhere: kdlog <POD_NAME>. For example: kdlog svc-user-segmentation-0.
With stern you can use this tool easily by writting simple commands like:
stern webhook | dlog
and you will get output like:

In case you need to watch the logs in real time and you are interested in a log level different from the configurared in the app, you can override it by setting the DOODLE_DLOG_LOG_LEVEL environment variable.
For example, if you set DOODLE_DLOG_LOG_LEVEL to warn, only warnings and errors will be displayed for you. This helps in real time debugging.