Tue Dec 20 05:05:04 PST 2005
- Previous message: [Slony1-general] What log_level for normal operation?
- Next message: [Slony1-general] Bug in RebuildListenEntries (ID: 1485)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Mon, 19 Dec 2005, Christopher Browne wrote: > "Marc G. Fournier" <marc at pgsql.com> writes: >> The default is set to 4 in slon.conf ... I just tried to "reduce" it >> to 3 and I got even more logging, so obviously *that* isn't the right >> way to set it ... >> >> Right now, at 4, I'm getting the whole config file spewed out at me >> and into syslog ... what log_level do I want to set things at for >> normal production? >> >> I checked man slon, and it doesn't really say much except what levels >> are available, but it doesn't mention how to get rid of the config >> file from being dump'd to syslog ... > > We normally run it at level 2; that's got enough info to be useful, > but doesn't seem to be *totally* gratuitous in logging irrelevancies. 'k, then there is either a bug in the syslog support in 1.1.5rc2, or I'm setting somethign wrong, since everything that is going to syslog is being dump'd to my login session to :( First, with log_level commented out in slon.conf, I'm getting the config file printed out to syslog: Dec 20 00:48:55 mx1 slon[2944]: [38-60] #desired_sync_time=60000 Dec 20 00:48:55 mx1 slon[2944]: [38-61] # Execute the following SQL on each node at slon connect time Dec 20 00:48:55 mx1 slon[2944]: [38-62] # useful to set logging levels, or to tune the planner/memory Dec 20 00:48:55 mx1 slon[2944]: [38-63] # settings. You can specify multiple statements by seperating Dec 20 00:48:55 mx1 slon[2944]: [38-64] # them with a ; Dec 20 00:48:55 mx1 slon[2944]: [38-65] #sql_on_connection="SET log_min_duration_statement TO '1000';" Now, looking in src/slon/misc.c, it looks like Use_syslog == 2 is actually ignored: #ifdef HAVE_SYSLOG if (Use_syslog >= 1) { write_syslog(syslog_level, outbuf); } #endif fwrite(outbuf, strlen(outbuf), 1, stdout); fflush(stdout); Shouldn't this be something like: #ifdef HAVE_SYSLOG if (Use_syslog >= 1) { write_syslog(syslog_level, outbuf); } if (Use_syslog < 2) { fwrite(outbuf, strlen(outbuf), 1, stdout); fflush(stdout); } #else fwrite(outbuf, strlen(outbuf), 1, stdout); fflush(stdout); #endif So that it *doesn't* to go stdout if we want syslog only?
- Previous message: [Slony1-general] What log_level for normal operation?
- Next message: [Slony1-general] Bug in RebuildListenEntries (ID: 1485)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-general mailing list