mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-23 07:06:30 +00:00
Simplify logger_init() parameters
We're passing the t_configuration_options structure anyway, no need to pass items it contains as separate parameters.
This commit is contained in:
5
log.c
5
log.c
@@ -141,8 +141,11 @@ log_verbose(int level, const char *fmt, ...)
|
||||
|
||||
|
||||
bool
|
||||
logger_init(t_configuration_options * opts, const char *ident, const char *level, const char *facility)
|
||||
logger_init(t_configuration_options * opts, const char *ident)
|
||||
{
|
||||
char *level = opts->loglevel;
|
||||
char *facility = opts->logfacility;
|
||||
|
||||
int l;
|
||||
int f;
|
||||
|
||||
|
||||
3
log.h
3
log.h
@@ -116,8 +116,7 @@ int detect_log_level(const char *level);
|
||||
|
||||
/* Logger initialisation and shutdown */
|
||||
|
||||
bool logger_init(t_configuration_options * opts, const char *ident,
|
||||
const char *level, const char *facility);
|
||||
bool logger_init(t_configuration_options * opts, const char *ident);
|
||||
|
||||
bool logger_shutdown(void);
|
||||
|
||||
|
||||
2
repmgr.c
2
repmgr.c
@@ -536,7 +536,7 @@ main(int argc, char **argv)
|
||||
strncpy(options.loglevel, runtime_options.loglevel, MAXLEN);
|
||||
}
|
||||
|
||||
logger_init(&options, progname(), options.loglevel, options.logfacility);
|
||||
logger_init(&options, progname());
|
||||
|
||||
if (runtime_options.verbose)
|
||||
logger_set_verbose();
|
||||
|
||||
Reference in New Issue
Block a user