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

Logging: Restore and enhance legacy logging docs #135093

Conversation

TinaHeiligers
Copy link
Contributor

@TinaHeiligers TinaHeiligers commented Jun 23, 2022

fixes #129381
fixes #134462

Part of #134169

Specifically:

  • adds legacy logging configuration setting back to the setup guide

  • enhances docs for platform logging

  • enhances and moves logging configuration migration guide to main upgrade docs

  • adds more detail and warnings about mixing legacy and current logging configuration

  • provide full logging configuration for debug level logging

  • Documentation was added for features that require explanation or tutorials

@TinaHeiligers TinaHeiligers added Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc release_note:skip Skip the PR/issue when compiling release notes backport:skip This commit does not require backporting docs v7.17.0 v7.17.1 v7.17.2 v7.17.3 v7.17.4 v7.17.5 v7.17.6 labels Jun 23, 2022
appenders: [console_appender]
--------------------------------------------------------------------------------

<1> Appender names are entirely custom with the restriction that appender names must be unique. Appenders may be used for multiple loggers.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm using the example as "soft" introduction to logging configuration.

NOTE: To reload the <<logging-settings, logging settings>>, send a SIGHUP signal to {kib}.

// deprecated logging configuration settings
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've split the legacy and current "settings" into two grouped sections to make it clear what is deprecated and what current settings are/will be supported in 8.0

+
[source,yaml]
--------------------------------------------------------------------------------
logging:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

specifically addresses #134462

@@ -1,13 +1,33 @@
[[logging-configuration-migration]]
== Logging configuration migration

[float]
=== Prepare for logging in 8.0
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adds an overview section with specific things to watch out for.

@TinaHeiligers TinaHeiligers requested a review from a team June 24, 2022 23:17
@TinaHeiligers TinaHeiligers marked this pull request as ready for review June 25, 2022 00:48
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-core (Team:Core)

@TinaHeiligers
Copy link
Contributor Author

@elasticmachine merge upstream

Copy link
Member

@lukeelmers lukeelmers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! I'm optimistic these improvements will help answer a lot of questions :)

I had a handful of nits, but only one important question around the accuracy of one of the sentences.

docs/setup/settings.asciidoc Show resolved Hide resolved
docs/setup/settings.asciidoc Outdated Show resolved Hide resolved
docs/setup/settings.asciidoc Outdated Show resolved Hide resolved
docs/setup/settings.asciidoc Outdated Show resolved Hide resolved
[float]
=== Prepare for logging in 8.0

The entire logging system changed to offer a more consistent logging behavior with {es}. The current system differs from the more simplistic, deprecated system and allows you the freedom to customize what, how and where {kib} outputs log messages. While for logging based use cases, we recommend the <<logging-service, logging service guide>>, there are some important considerations:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Maybe specifically call out log4j 2 here?

The entire logging system changed to offer a more consistent logging behavior with {es}, which uses the popular log4j 2 for managing logs.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: For whatever reason my brain isn't grokking this line:

While for logging based use cases, we recommend the <<logging-service, logging service guide>>, there are some important considerations

Not super sure what you intended here, but maybe something like this?

The best place to learn about the new logging system is our logging service guide. However, there are some important considerations when you are working from migrating from the old to the new system:

Copy link
Contributor Author

@TinaHeiligers TinaHeiligers Jun 28, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was trying to say that we recommend going through the logging service guide if you rely on Kibana logging. Your wording is clearer, thanks!


[float]
==== Mixing deprecated and current configurations
{kib} supports mixed usage of the deprecated and current logging configuration styles, however, we recommend changing them all at once to reduce the risk of the systems interfering.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: or maybe "to reduce the risk of confusion that may arise from conflicting configs"?

Comment on lines +125 to +134
logging:
appenders:
console_appender:
type: console
layout:
type: pattern
highlight: true
root:
appenders: [default, console_appender]
level: debug
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Is this one necessary? The only non-default setting here is logging.root.level, so we might not need to change it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added a full config to address Enabling debug logs in Kibana 7.17.3 not well documented and because folks often don't follow links to other documentation.

Co-authored-by: Luke Elmers <lukeelmers@gmail.com>
Copy link
Member

@lukeelmers lukeelmers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Here's to hoping we start seeing fewer questions about the new system 🤞

@TinaHeiligers TinaHeiligers merged commit aaaeee8 into elastic:7.17 Jun 29, 2022
@TinaHeiligers TinaHeiligers deleted the kbn-129381-logging-configuration-old-and-new branch June 29, 2022 16:58
@TinaHeiligers TinaHeiligers removed the backport:skip This commit does not require backporting label Jun 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs release_note:skip Skip the PR/issue when compiling release notes Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc v7.17.0 v7.17.1 v7.17.2 v7.17.3 v7.17.4 v7.17.5 v7.17.6
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants