Ian Barwick
afda3419cc
Put declarations at top of file
2015-10-27 13:17:18 +09:00
Ian Barwick
3bc0b80a71
Reword log level error message to be more like the Postgres one
2015-10-07 10:54:47 +09:00
Ian Barwick
f6d02b85d8
Better handling of situation where logfile can't be opened
...
If freopen() fails, stderr is diverted to an undisclosed location
and it's not clear what is going on.
Also add an explicit notice announcing our intention to divert
logging output to a file.
Per #105 .
Note that it might make sense to disable logfile output when
running the repmgr command line client as normally you'd expect
immediate feedback.
2015-09-15 13:37:40 +09:00
Ian Barwick
4e9c58c7db
Update copyright to 2015
2015-01-03 08:12:13 +09:00
Christian Kruse
9eba986833
avoid usage of snprintf()
...
We have a nice little abstraction for snprintf with covering the case
that a string is too big for the target buffer – let's use that!
2014-03-06 18:34:40 +01:00
Christian Kruse
d8b8bf0e2a
pg_indent'ing all files…
2014-03-06 18:34:40 +01:00
Christian Kruse
90ecb2b107
fix: check return values of freopen()
...
Some compiles complain about not checking the return value of freopen(),
so we check it
2014-03-04 15:32:48 +01:00
Christian Kruse
d58fd080ca
flush stderr after a log message appears
...
We had the problem that the log file appeared empty for a long time due
to file buffers. Thus we call fflush() after every log message so the
log file gets written out to disk quickly
2014-02-15 01:29:12 +01:00
Christian Kruse
680f23fb1d
copyright push
2014-01-23 10:37:49 +01:00
Christian Kruse
a08aa50f92
fix: close stdin and stdout only in repmgrd
...
closing stdin and stdout might cause problems when using system(), so we
avoid it.
2014-01-16 16:01:58 +01:00
Christian Kruse
9563877fbb
new config option, stdout/stdin closed
...
Now stdin and stdout get closed. Additionally stderr gets closed and
reopened to the new config option „logfile“ if specified
2014-01-16 15:22:34 +01:00
Jaime Casanova
493133986d
Add timestamps to log line in stderr
...
Patch by Christian Kruse
2013-12-19 01:15:28 -05:00
Jaime Casanova
50b7147f15
Change Copyright date to cover 2012
2012-07-04 10:47:26 -05:00
Greg Smith
3b2203c38c
Make verbose command line option useful on top of
...
the new logging infrastructure.
2011-02-23 05:29:29 -05:00
Greg Smith
0130420947
astyle cleanup run after recent merges
2011-02-10 18:55:51 -05:00
Greg Smith
1d32133d49
Update all the copyrights to add 2011
2011-02-10 18:33:02 -05:00
Gabriele Bartolini
6e1306cfb2
Uses a switch to detect the log level
2011-02-10 16:09:46 -05:00
Gabriele Bartolini
83eee2ed96
added some messages to the clone command
2011-02-10 16:08:07 -05:00
Gabriele Bartolini
3146d2c676
fixed some bugs with standby clone
2011-02-10 16:08:07 -05:00
Gabriele Bartolini
3f1c6a5852
Removed any sprintf/strcpy call and use snprintf/strncpy - Fixed bug with tblspc_dir - added debug messages after every query
2011-02-10 16:08:07 -05:00
Gabriele Bartolini
7a3be3a2f9
Cleaned log messages (\n at the end of every line)
2011-02-10 15:58:55 -05:00
Gabriele Bartolini
f6a6632169
Added new log system to both repmgr and repmgrd. Needs cleaning, but it is a good starting point
2011-02-10 15:58:55 -05:00
Gabriele Bartolini
2c1eafd7a9
first alpha version for syslog support
2011-02-10 15:56:10 -05:00