docs/generated/logging.md
The INFO severity is used for informational messages that do not
require action.
The WARNING severity is used for situations which may require special handling,
where normal operation is expected to resume automatically.
The ERROR severity is used for situations that require special handling,
where normal operation could not proceed as expected.
Other operations can continue mostly unaffected.
The FATAL severity is used for situations that require an immedate, hard
server shutdown. A report is also sent to telemetry if telemetry
is enabled.
DEVThe DEV channel is used during development to collect log
details useful for troubleshooting that fall outside the
scope of other channels. It is also the default logging
channel for events not associated with a channel.
This channel is special in that there are no constraints as to
what may or may not be logged on it. Conversely, users in
production deployments are invited to not collect DEV logs in
centralized logging facilities, because they likely contain
sensitive operational data.
See Configure logs.
OPSThe OPS channel is used to report "point" operational events,
initiated by user operators or automation:
HEALTHThe HEALTH channel is used to report "background" operational
events, initiated by CockroachDB or reporting on automatic processes:
STORAGEThe STORAGE channel is used to report low-level storage
layer events (RocksDB/Pebble).
SESSIONSThe SESSIONS channel is used to report client network activity when enabled via
the server.auth_log.sql_connections.enabled and/or
server.auth_log.sql_sessions.enabled cluster setting:
This is typically configured in "audit" mode, with event numbering and synchronous writes.
SQL_SCHEMAThe SQL_SCHEMA channel is used to report changes to the
SQL logical schema, excluding privilege and ownership changes
(which are reported separately on the PRIVILEGES channel) and
zone configuration changes (which go to the OPS channel).
This includes:
SQL_SCHEMA events generally comprise changes to the schema that affect the
functional behavior of client apps using stored objects.
USER_ADMINThe USER_ADMIN channel is used to report changes
in users and roles, including:
This is typically configured in "audit" mode, with event numbering and synchronous writes.
PRIVILEGESThe PRIVILEGES channel is used to report data
authorization changes, including:
This is typically configured in "audit" mode, with event numbering and synchronous writes.
SENSITIVE_ACCESSThe SENSITIVE_ACCESS channel is used to report SQL
data access to sensitive data:
sql.log.user_audit cluster setting)This is typically configured in "audit" mode, with event numbering and synchronous writes.
SQL_EXECThe SQL_EXEC channel is used to report SQL execution on
behalf of client connections:
sql.log.all_statements.enabled cluster setting)SQL_PERFThe SQL_PERF channel is used to report SQL executions
that are marked as "out of the ordinary"
to facilitate performance investigations.
This includes the SQL "slow query log".
Arguably, this channel overlaps with SQL_EXEC.
However, we keep both channels separate for backward compatibility
with versions prior to v21.1, where the corresponding events
were redirected to separate files.
SQL_INTERNAL_PERFThe SQL_INTERNAL_PERF channel is like the SQL_PERF channel, but is aimed at
helping developers of CockroachDB itself. It exists as a separate
channel so as to not pollute the SQL_PERF logging output with
internal troubleshooting details.
TELEMETRYThe TELEMETRY channel reports telemetry events. Telemetry events describe
feature usage within CockroachDB and anonymizes any application-
specific data.
KV_DISTRIBUTIONThe KV_DISTRIBUTION channel is used to report data distribution events, such as moving
replicas between stores in the cluster, or adding (removing) replicas to
ranges.
CHANGEFEEDThe CHANGEFEED channel is used to report changefeed events
KV_EXECThe KV_EXEC channel is used to report KV execution events that don't fall into the
KV_DISTRIBUTION channel.