Repository URL to install this package:
|
Version:
0.0.1-c39849eb0bb7c8 ▾
|
| app |
| package.json |
| Jenkinsfile |
| README.md |
| yarn.lock |
A small utility tool to parse and print our JSON logs into a more human readable format
node installed and you have at least read access to Doodle's NPM repository.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:
alias kdlog="k logs -f $1 | dlog
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.
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.