Commit Graph

16 Commits

Author SHA1 Message Date
Ian Barwick
8f62b4c9e6 Update copyright notice to 2016 2016-01-05 15:57:25 +09:00
Ian Barwick
f64c42a514 Simplify logger_init() parameters
We're passing the t_configuration_options structure anyway, no need to
pass items it contains as separate parameters.
2015-11-30 16:17:17 +09:00
Ian Barwick
807dcc1038 Repurpose -v/--verbose; add -t/--terse option (repmgr only)
repmgr and particularly repmgrd currently produce substantial
amounts of log output. Much of this is only useful when troubleshooting
or debugging.

Previously the -v/--verbose option just forced the log level to
INFO. With repmgrd this is pretty pointless - just set the log
level in the configuration file. With repmgr the configuration
file can be overriden by the new -L/--log-level option.

-v/--verbose now provides an additional, chattier/pedantic level
of logging ("Opening *this* logfile", "Executing *this* query",
"running in *this* loop") which is helpful for understanding
repmgr/repmgrd's behaviour, particularly for troubleshooting.
What additional verbose logging is generated will of course a
also depends on the log level set, so e.g. someone trying to
work out which configuration file is actually being opened
can use '--log-level=INFO --verbose' without being bothered
by an avalanche of extra verbose debugging output.

-t/--terse option will silence certain non-essential output, at
the moment any HINTs.

Note that -v/--verbose and -t/--terse are not mutually exclusive
(suggestions for better names welcome).
2015-11-30 16:15:03 +09:00
Ian Barwick
acc0ffa81f Add -L/--log-level command line option to repmgr
Overrides any setting in the config file. This will replace the
-v/--verbose option.
2015-11-30 16:14:54 +09:00
Ian Barwick
ae84041a4e Add log_hint() function for logging hints
There are a few places where additional hints are written as log
output, usually LOG_NOTICE. Create an explicit function to provide
hints in a standardized manner; by storing the log level of the
previous logger call, we can ensure the hint is only displayed when
the log message itself would be.

Part of an ongoing effort to better control repmgr's logging output.
2015-11-30 16:14:08 +09:00
Ian Barwick
4e9c58c7db Update copyright to 2015 2015-01-03 08:12:13 +09:00
Christian Kruse
d8b8bf0e2a pg_indent'ing all files… 2014-03-06 18:34:40 +01:00
Christian Kruse
680f23fb1d copyright push 2014-01-23 10:37:49 +01:00
Christian Kruse
b4e83cf188 Add format attribute checking for printf() like functions
Patch by Marco Nenciarini <mnencia@debian.org>
2014-01-21 14:14:36 +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
18ef5b3cf3 Convert more uses of fprintf to use logger 2011-02-23 05:59:09 -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
1d32133d49 Update all the copyrights to add 2011 2011-02-10 18:33:02 -05:00
Gabriele Bartolini
2c1eafd7a9 first alpha version for syslog support 2011-02-10 15:56:10 -05:00