system.text_log

Contains logging entries. The logging level which goes to this table can be limited to the text_log.level server setting.

Columns:

  • event_date (Date) — Date of the entry.
  • event_time (DateTime) — Time of the entry.
  • event_time_microseconds (DateTime) — Time of the entry with microseconds precision.
  • microseconds (UInt32) — Microseconds of the entry.
  • thread_name (String) — Name of the thread from which the logging was done.
  • thread_id (UInt64) — OS thread ID.
  • level (Enum8) — Entry level. Possible values:
    • 1 or 'Fatal'.
    • 2 or 'Critical'.
    • 3 or 'Error'.
    • 4 or 'Warning'.
    • 5 or 'Notice'.
    • 6 or 'Information'.
    • 7 or 'Debug'.
    • 8 or 'Trace'.
  • query_id (String) — ID of the query.
  • logger_name (LowCardinality(String)) — Name of the logger (i.e. DDLWorker).
  • message (String) — The message itself.
  • revision (UInt32) — ClickHouse revision.
  • source_file (LowCardinality(String)) — Source file from which the logging was done.
  • source_line (UInt64) — Source line from which the logging was done.

Example

  1. SELECT * FROM system.text_log LIMIT 1 \G
  1. Row 1:
  2. ──────
  3. event_date: 2020-09-10
  4. event_time: 2020-09-10 11:23:07
  5. event_time_microseconds: 2020-09-10 11:23:07.871397
  6. microseconds: 871397
  7. thread_name: clickhouse-serv
  8. thread_id: 564917
  9. level: Information
  10. query_id:
  11. logger_name: DNSCacheUpdater
  12. message: Update period 15 seconds
  13. revision: 54440
  14. source_file: /ClickHouse/src/Interpreters/DNSCacheUpdater.cpp; void DB::DNSCacheUpdater::start()
  15. source_line: 45

Original article