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

Consume logging config via CLI #57548

Closed
mshustov opened this issue Feb 13, 2020 · 4 comments · Fixed by #92087
Closed

Consume logging config via CLI #57548

mshustov opened this issue Feb 13, 2020 · 4 comments · Fixed by #92087

Comments

@mshustov
Copy link
Contributor

Kibana supports 4 logging settings being passed via CLI

if (opts.quiet) set('logging.quiet', true);
if (opts.silent) set('logging.silent', true);
if (opts.verbose) set('logging.verbose', true);
if (opts.logFile) set('logging.dest', opts.logFile);
.
We can support at least logging.root.level that supersedes quiet, silent and verbose.

@mshustov mshustov added Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc Feature:New Platform labels Feb 13, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-platform (Team:Platform)

@mshustov mshustov removed the Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc label Feb 26, 2020
@joshdover joshdover mentioned this issue Mar 17, 2020
30 tasks
@joshdover joshdover added this to 7.13 - Tentative in kibana-core [DEPRECATED] Dec 2, 2020
@TinaHeiligers
Copy link
Contributor

TinaHeiligers commented Feb 18, 2021

We can support at least logging.root.level that supersedes quiet, silent and verbose.

@restrry what is the scope of this issue? The words: "...at least..." make me think that it might be larger than just adding support for logging.root.level.

ATM, we only get KP logs from kibana not running in dev mode when we add the full config for the root level logger:

node scripts/kibana serve --logging.root.level=debug --logging.root.appenders[0]=default --logging.root.appenders[1]=console

Without --logging.root.appenders[1]=console, only the legacy logs show up.

If we did introduce a shortcut for the root level logger, what would this look like? (something along the lines of --logging.level=debug or --logging=debug?

Would we then require the appenders to be passed in too (and throw an error if they aren't) or would we proactively add the other config settings? For example, internally set the root appenders to default and console?

Once we remove the legacy logging system, we should be able to introduce cleaner shortcuts (or repurpose the ones folks are already used to using). Until then though, how about just adding support for the full config path as it would be set in the config yml file?

@mshustov
Copy link
Contributor Author

If we did introduce a shortcut for the root level logger, what would this look like?

No, I wouldn't introduce the shortcuts.

If it already works, I'd add a note to the logging/README.md on how to reproduce the legacy system behavior (for both CLI and config).
Something like:

Logging configuration via CLI

legacy logging Kibana Platform logging
--verbose --logging.root.level=debug --logging.root.appenders[0]=default --logging.root.appenders[1]=console
.... ...

*note that you have to pass the default appender until the legacy logging system is removed in v8.0

ATM, we only get KP logs from kibana not running in dev mode when we add the full config for the root level logger:

Do you mean that a user running Kibana dist has to specify --logging.root.appenders to see Kibana Platform logs?

Until then though, how about just adding support for the full config path as it would be set in the config yml file?

Could you elaborate, please?

@TinaHeiligers
Copy link
Contributor

TinaHeiligers commented Feb 19, 2021

Do you mean that a user running Kibana dist has to specify --logging.root.appenders to see Kibana Platform logs?

When I start kibana without adding any config to kibana.yml with any of

  • node scripts/kibana serve,
  • node scripts/kibana serve --logging.root.level=debug or
  • scripts/kibana serve --logging.root.level=debug --logging.root.appenders[0]=default

I only get legacy platform logs.
So yes, the appenders have to be specified.

Until then though, how about just adding support for the full config path as it would be set in the config yml file?

Could you elaborate, please?

This was a follow up question for if we are going to introduce shortcuts. What I meant was using --logging.root.level=debug --logging.root.appenders[0]=default --logging.root.appenders[1]=console rather than taking over the --verbose option that we use for legacy logs (or some other shortcut that we would have used if we decided to introduce shortcuts).

kibana-core [DEPRECATED] automation moved this from 7.13 - Tentative to Done (7.12) Feb 22, 2021
@joshdover joshdover moved this from Done (7.12) to Done (7.13) in kibana-core [DEPRECATED] Mar 3, 2021
@joshdover joshdover moved this from Done (7.13) to Done (7.12) in kibana-core [DEPRECATED] Mar 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging a pull request may close this issue.

3 participants