diff options
| author | Tom Lane | 2004-03-22 15:34:22 +0000 |
|---|---|---|
| committer | Tom Lane | 2004-03-22 15:34:22 +0000 |
| commit | d81cd7032eb6c44e55e1528aac90cd9fb447be74 (patch) | |
| tree | bf155d1a560b9f3be5aaa4da77f31796394da19b /contrib/pg_autovacuum | |
| parent | 682a6bd5eb55cb3880cd52101f66f7a3e0f41a86 (diff) | |
Standardize output buffer size and display format for strftime;
followup to complaint from Korean User's Group.
Diffstat (limited to 'contrib/pg_autovacuum')
| -rw-r--r-- | contrib/pg_autovacuum/pg_autovacuum.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/contrib/pg_autovacuum/pg_autovacuum.c b/contrib/pg_autovacuum/pg_autovacuum.c index ed59024b69d..89f0e0bf91d 100644 --- a/contrib/pg_autovacuum/pg_autovacuum.c +++ b/contrib/pg_autovacuum/pg_autovacuum.c @@ -5,9 +5,8 @@ */ #include "pg_autovacuum.h" -#define TIMEBUFF 256 + FILE *LOGOUTPUT; -char timebuffer[TIMEBUFF]; char logbuffer[4096]; void @@ -15,11 +14,11 @@ log_entry(const char *logentry) { time_t curtime; struct tm *loctime; + char timebuffer[128]; curtime = time(NULL); loctime = localtime(&curtime); - strftime(timebuffer, TIMEBUFF, "%Y-%m-%d %r", loctime); /* cbb - %F is not - * always available */ + strftime(timebuffer, sizeof(timebuffer), "%Y-%m-%d %H:%M:%S %Z", loctime); fprintf(LOGOUTPUT, "[%s] %s\n", timebuffer, logentry); } |
