pgpool2.git / summary / log / commit / refs

commit    228da1fc32a2335cb19fb3abd72b4c4c1056141a
Author:   Tatsuo Ishii <ishii@sraoss.co.jp>
Date:     Fri Jan 14 07:35:31 2022 +0000

    Change the default value for log_line_prefix.
    
    Currently the default value for log_line_prefix is "%t pid: %p", which
    is the long standing default. Also since 4.2, %a (application name) and
    since 4.3 %m (timestamp with millisecond) are available.
    
    This commit changes %t" (timestamp without millisecond) to %m because
    PostgreSQL's default is already %m.  Also add %a so that admins easily
    distinguish particular process's log.
    
    In summary the default is changed from:
    "%t pid: %p"
    to:
    "%m %a pid: %p"
    
    This change will be applied to not only master branch but 4.3
    stable. There's not so many 4.3 users yet and changing the default
    will not affect existing 4.3 users. Only new 4.3 will enjoy the new
    default.
    
    Discussion: https://www.pgpool.net/pipermail/pgpool-hackers/2022-January/004098.html


doc.ja/src/sgml/connection-pooling.sgml | 7 ++----- doc/src/sgml/connection-pooling.sgml | 4 +--- src/config/pool_config_variables.c | 2 +- src/sample/pgpool.conf.sample-stream | 2 +- 4 files changed, 5 insertions(+), 10 deletions(-) diff --git a/doc.ja/src/sgml/connection-pooling.sgml b/doc.ja/src/sgml/connection-pooling.sgml index 165cc7c91..1faa6bfda 100644 --- a/doc.ja/src/sgml/connection-pooling.sgml +++ b/doc.ja/src/sgml/connection-pooling.sgml @@ -1289,16 +1289,13 @@ local0.* /var/log/pgpool.log <literal>%</literal> characters begin <quote>escape sequences</> that are replaced with information outlined below. All unrecognized escapes are ignored. Other characters are copied straight to - the log line. Default is '%t: pid %p: ', which prints timestamp and process id, - which keeps backward compatibly with pre<productname>Pgpool-II</productname> - <emphasis>V3.4</emphasis>. + the log line. Default is '%m: %a pid %p: ', which prints timestamp, application name and process id. --> これは、各ログ行の先頭に出力する<function>printf</>の書式文字列です。 <literal>%</>から始まる<quote>エスケープシーケンス</>は、後述の通りのステータス情報で置き換えられます。 認識できないエスケープは無視されます。 他の文字はそのままログ行に出力されます。 - デフォルトは '%t: pid %p: 'で、タイムスタンプとプロセスIDを印字します。 - これは、<productname>Pgpool-II</productname> <emphasis>V3.4</emphasis>より前のバージョンとの互換性を保つためです。 + デフォルトは '%m: %a pid %p: 'で、タイムスタンプ、アプリケーション名、プロセスIDを印字します。 </para> <table id="log-line-prefix-table"> diff --git a/doc/src/sgml/connection-pooling.sgml b/doc/src/sgml/connection-pooling.sgml index d0793fb94..fbd59289d 100644 --- a/doc/src/sgml/connection-pooling.sgml +++ b/doc/src/sgml/connection-pooling.sgml @@ -832,9 +832,7 @@ <literal>%</literal> characters begin <quote>escape sequences</> that are replaced with information outlined below. All unrecognized escapes are ignored. Other characters are copied straight to - the log line. Default is '%t: pid %p: ', which prints timestamp and process id, - which keeps backward compatibility with pre<productname>Pgpool-II</productname> - <emphasis>V3.4</emphasis>. + the log line. Default is '%m: %a pid %p: ', which prints timestamp, application name and process id. </para> <table id="log-line-prefix-table"> diff --git a/src/config/pool_config_variables.c b/src/config/pool_config_variables.c index 1c33cf6c4..57b9dfe17 100644 --- a/src/config/pool_config_variables.c +++ b/src/config/pool_config_variables.c @@ -911,7 +911,7 @@ static struct config_string ConfigureNamesString[] = CONFIG_VAR_TYPE_STRING, false, 0 }, &g_pool_config.log_line_prefix, - "%t: pid %p: ", + "%m: %a pid %p: ", NULL, NULL, NULL, NULL }, diff --git a/src/sample/pgpool.conf.sample-stream b/src/sample/pgpool.conf.sample-stream index 2a3cc752c..7a71dc83d 100644 --- a/src/sample/pgpool.conf.sample-stream +++ b/src/sample/pgpool.conf.sample-stream @@ -193,7 +193,7 @@ backend_clustering_mode = 'streaming_replication' # - What to log - -#log_line_prefix = '%t: pid %p: ' # printf-style string to output at beginning of each log line. +#log_line_prefix = '%m: %a pid %p: ' # printf-style string to output at beginning of each log line. #log_connections = off # Log connections [parent: dee32d5eff57]