回覆列表
  • 1 # 使用者7063786766555

    主要需要修改的引數如下,引數修改完畢後重啟服務,重新連線資料庫,對其操作即可檢視日誌變化情況。

    # - When to Log -

    client_min_messages = info

    #client_min_messages = notice # values in order of decreasing

    detail:

    # debug5

    # debug4

    # debug3

    # debug2

    # debug1

    # log

    # notice

    # warning

    # error

    log_min_messages = info

    #log_min_messages = warning # values in order of decreasing

    detail:

    # debug5

    # debug4

    # debug3

    # debug2

    # debug1

    # info

    # notice

    # warning

    # error

    # log

    # fatal

    # panic

    log_min_error_statement = info

    #log_min_error_statement = error # values in order of decreasing

    detail:

    # debug5

    # debug4

    # debug3

    # debug2

    # debug1

    # info

    # notice

    # warning

    # error

    # log

    # fatal

    # panic (effectively off)

    #log_min_duration_statement = -1 # -1 is disabled, 0 logs all

    statements

    # and their durations, > 0

    logs only

    # statements running at least

    this number

    # of milliseconds

    # - What to Log -

    #debug_print_parse = off

    #debug_print_rewritten = off

    #debug_print_plan = off

    #debug_pretty_print = on

    #log_checkpoints = off

    log_connections = on

    log_disconnections = on

    #log_duration = off

    log_error_verbosity = verbose # terse, default, or verbose

    messages

    #log_hostname = off

    log_line_prefix = "%a %u %d %h %t %i %e " # special

    values:

    # %a = application name

    # %u = user name

    # %d = database name

    # %r = remote host and

    port(this is a os port)

    # %h = remote host

    # %p = process ID

    # %t = timestamp without

    milliseconds

    # %m = timestamp with

    milliseconds

    # %i = command tag

    # %e = SQL state

    # %c = session ID

    # %l = session line number

    # %s = session start

    timestamp

    # %v = virtual transaction

    ID

    # %x = transaction ID (0 if

    none)

    # %q = stop here in

    non-session

    # processes

    # %% = "%"

    # e.g. "<%u%%%d> "

    #log_lock_waits = off # log lock waits >=

    deadlock_timeout

    log_statement = "all" # none, ddl, mod, all

    #log_temp_files = -1 # log temporary files equal or

    larger

    # than the specified size in

    kilobytes;

    # -1 disables, 0 logs all temp

    files

    log_timezone = "Asia/Hong_Kong"

  • 中秋節和大豐收的關聯?
  • 維拉克斯油耗怎麼樣?