Replaced clixon_get_logflags() with clixon_logflags_get()
Added `clixon_logflags_set()`
This commit is contained in:
parent
39fb149756
commit
1709537701
5 changed files with 36 additions and 18 deletions
|
|
@ -977,7 +977,7 @@ main(int argc,
|
|||
free(restarg);
|
||||
/* Dont log terminate on stderr or stdout */
|
||||
clixon_log_init(h, __PROGRAM__, LOG_INFO,
|
||||
clixon_get_logflags() & ~(CLIXON_LOG_STDERR|CLIXON_LOG_STDOUT));
|
||||
clixon_logflags_get() & ~(CLIXON_LOG_STDERR|CLIXON_LOG_STDOUT));
|
||||
clixon_log(h, LOG_NOTICE, "%s: %u Terminated", __PROGRAM__, getpid());
|
||||
if (h)
|
||||
cli_terminate(h);
|
||||
|
|
|
|||
|
|
@ -487,7 +487,7 @@ cli_handler_err(FILE *f)
|
|||
{
|
||||
if (clixon_err_category()){
|
||||
/* Check if error is already logged on stderr */
|
||||
if ((clixon_get_logflags() & CLIXON_LOG_STDERR) == 0){
|
||||
if ((clixon_logflags_get() & CLIXON_LOG_STDERR) == 0){
|
||||
if (clixon_err_category() != -1)
|
||||
fprintf(f, "%s: ", clixon_err_str());
|
||||
fprintf(f, "%s", clixon_err_reason());
|
||||
|
|
@ -537,7 +537,7 @@ clicon_parse(clixon_handle h,
|
|||
pt_head *ph;
|
||||
|
||||
ch = cli_cligen(h);
|
||||
if (clixon_get_logflags()&CLIXON_LOG_STDOUT)
|
||||
if (clixon_logflags_get()&CLIXON_LOG_STDOUT)
|
||||
f = stdout;
|
||||
else
|
||||
f = stderr;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue