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

cli: simplify the configuration of logging #51007

Closed
knz opened this issue Jul 6, 2020 · 2 comments
Closed

cli: simplify the configuration of logging #51007

knz opened this issue Jul 6, 2020 · 2 comments
Labels
A-logging In and around the logging infrastructure. C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)

Comments

@knz
Copy link
Contributor

knz commented Jul 6, 2020

Today we have two flags --log-dir and --sql-audit-dir that configure the main logging directory and the SQL audit log directory separately.

Ideally, we want configurability per logger.

Also if we start supporting network loggers we'll want that to be configurable too.

To avoid a proliferation of flags, we should migrate away from discrete flags and into a more structured configuration format, akin to what is done already with --store.

We need to answer the following questions:

  • do we want to support bundling? (multiple loggers to the same sink)
  • do we want to support teeing? (single logger to multiple sinks)

With the status quo (bundling only possible to the same directory, i.e. no sink bundling, and no teeing) we could have:

--log-output=<channel>:<sinktype>:<parameters/path>

to configure a sink/path per logger; or conversely

--log-output=<sinktype>:<channel>:<parameters/path>

Special cases:

  • without a configuration, we'd have a default derived from the first non-memory --store, as currently
  • if --log-dir / --sql-audit-dir are specified, they would be used as defaults too
  • each logger without a configured sink defaults to the same parameters as the "general" logger.
@knz knz added C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) A-cli A-logging In and around the logging infrastructure. labels Jul 6, 2020
@knz
Copy link
Contributor Author

knz commented Jul 30, 2020

Discussed in #51990

@knz
Copy link
Contributor Author

knz commented Dec 14, 2020

Fixed by #57134

@knz knz closed this as completed Dec 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-logging In and around the logging infrastructure. C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)
Projects
None yet
Development

No branches or pull requests

1 participant