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

Please clarify changes to the logging system with 21.2 #10791

Closed
cjireland opened this issue Jun 16, 2021 · 4 comments · Fixed by #11818
Closed

Please clarify changes to the logging system with 21.2 #10791

cjireland opened this issue Jun 16, 2021 · 4 comments · Fixed by #11818
Assignees

Comments

@cjireland
Copy link

The current docs refer to changes to the logging system here: https://www.cockroachlabs.com/docs/v21.1/logging-overview.html#changes-to-logging-system.

It is not entirely clear what those changes will be in the context of the new logging model.

For example, will we have to include file names for each channel otherwise a channel will not be exported? How do we do that?

Whilst we have a set of default cfg for 21.1, when it comes to 21.2 it would be great to see what changes we would need to make for 21.2 in order to get exactly the same output as 20.x. Ideally a set of cfg for 21.2 should be included to give people the same logs as https://www.cockroachlabs.com/docs/v21.1/configure-logs#default-logging-configuration.

@jseldess
Copy link
Contributor

@cjireland, 21.2 is still in development and, I imagine, not ready for documentation. Can you clarify what you're looking for here?

@cjireland
Copy link
Author

Hi @jseldess , sure. With 21.2 it seems that plans are afoot to change the logging and possibly remove some of the defaults so changes will be required in order to retain the status quo, see:

Note:
In v21.1, the default logging configuration keeps the legacy filenames for these channels. Starting in v21.2, you will need to explicitly map the channels to the legacy filenames in order to preserve this configuration. For details on this, see Configure Logs.

This request is really to preempt that and ensure that the 21.2 docs include all the settings so that a client can maintain the status quo as far as logging is concerned should they wish.

This has been done for 21.1 here: https://www.cockroachlabs.com/docs/v21.1/configure-logs#default-logging-configuration.

@taroface
Copy link
Contributor

@knz Assuming the callout is still accurate:

In v21.1, the default logging configuration keeps the legacy filenames for these channels. Starting in v21.2, you will need to explicitly map the channels to the legacy filenames in order to preserve this configuration. For details on this, see Configure Logs.

Do we have any insights on the default logging behavior in v21.2 if --log is not specified? e.g.

will we have to include file names for each channel otherwise a channel will not be exported?

Would this yaml (sinks object) need to be explicitly set in order to preserve the legacy filenames?

Also, I noticed a discrepancy in that yaml: SESSIONS channel is set to sql-auth, but I think the previous filename for the SQL auth log was cockroach-auth.log. Was this an intentional change?

@knz
Copy link
Contributor

knz commented Jun 23, 2021

I noticed a discrepancy in that yaml: SESSIONS channel is set to sql-auth, but I think the previous filename for the SQL auth log was cockroach-auth.log. Was this an intentional change?

That doesn't seem intentional... However I'm noticing we don't have tests for the generated file names either. So that is an oversight combined with a lack of testing/QA.

That said:

  • I'm noticing that no customer has complained yet so maybe they don't care.
  • it feels "wrong" to revert/change this now in 21.1. Maybe it would be better to document this particular change as a backward-incompatible change from v20.2 to v21.1.

Do we have any insights on the default logging behavior in v21.2 if --log is not specified? e.g.

cockroach debug check-log-config would tell you

Would this yaml (sinks object) need to be explicitly set in order to preserve the legacy filenames?

it would be, but it's overkill.

The following yaml is the minimal yaml sufficient to obtain a similar behavior to 20.2:

sinks:
  file-groups:
    pebble:
      channels: [STORAGE]
    sql-audit:
      channels: [SENSITIVE_ACCESS]
    auth:
      channels: [SESSIONS]
    sql-exec:
      channels: [SQL_EXEC]
    sql-slow:
      channels: [SQL_PERF]
    sql-slow-internal-only:
      channels: [SQL_INTERNAL_PERF]

(change auth: to sql-auth: to get the same behavior as 21.1)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants