How to handle logging in console clients #920
josecelano
started this conversation in
Proposals
Replies: 1 comment
-
Option 2: quite and debug flags
Example:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Relates to: #917
In some console clients, we mixed the logging output (standard output) with the app response in JSON format (standard output).
Ideally, we should have a clean JSON that can be parsed easily or sent to the next app in the pipeline.
I see only one option.
Option 1: use a file for logging
We can redirect the logs to a file instead of using standard output. The file could have a default location or be overwritten.
If there is an error, we can write the error to the standard output in a JSON format if we want to show the error to the user and write the error to the log file if we only want to track it internally.
Beta Was this translation helpful? Give feedback.
All reactions