Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add opinionated logging integration #1008

Open
jvalkeal opened this issue Feb 17, 2024 · 0 comments
Open

Add opinionated logging integration #1008

jvalkeal opened this issue Feb 17, 2024 · 0 comments
Labels
type/enhancement Is an enhancement request

Comments

@jvalkeal
Copy link
Contributor

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.

@jvalkeal jvalkeal added the type/enhancement Is an enhancement request label Feb 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement Is an enhancement request
Projects
None yet
Development

No branches or pull requests

1 participant