Open
Description
Backround; logging is hard especially with cli apps where whole infrastructure is designed for server applications.
While logging should be relatively fine with plain command output it will completely mess up terminal if there is any interactive components relying terminal escape characters.
In normal shell app you want to disable console logging:
logging:
pattern:
console:
And possibly add debug logs to a shell temporarily:
logging:
file:
name: shell.log
level:
root: debug
org:
springframework:
shell: debug
Trouble with this is that you never get any errors if a shell hard fails at startup.
We should come up with custom opinionated logging configuration so that:
- User can conditionally enable debug logging
- Can configure logging into file
- Can have some automatic "magic" depending if command is interactive or non-interactive
- Regarding if terminal should not have any logging into console, automatically write those into file
We'll keep this issue to collect ideas and other discussion to prepare a solution.