aboutgitcodebugslistschat
path: root/util.h
diff options
context:
space:
mode:
authorStefano Brivio <sbrivio@redhat.com>2023-02-15 12:47:48 +0100
committerStefano Brivio <sbrivio@redhat.com>2023-02-16 17:32:30 +0100
commitb4f13c2b189c24ae1ef7fee562d5be7147efd477 (patch)
treefa478406bed136525cad280ae7faf1dd2b71ad76 /util.h
parentc9af6f92db9f760e0b03a75bf688439e4aeab231 (diff)
downloadpasst-b4f13c2b189c24ae1ef7fee562d5be7147efd477.tar
passt-b4f13c2b189c24ae1ef7fee562d5be7147efd477.tar.gz
passt-b4f13c2b189c24ae1ef7fee562d5be7147efd477.tar.bz2
passt-b4f13c2b189c24ae1ef7fee562d5be7147efd477.tar.lz
passt-b4f13c2b189c24ae1ef7fee562d5be7147efd477.tar.xz
passt-b4f13c2b189c24ae1ef7fee562d5be7147efd477.tar.zst
passt-b4f13c2b189c24ae1ef7fee562d5be7147efd477.zip
log: Don't duplicate messages on stderr before daemonising
Now that logging functions force printing messages to stderr before passt forks to background, we'll have duplicate messages when running from an interactive terminal, or if --stderr is passed, because at some point we set LOG_PERROR in our __openlog() wrapper. We could defer setting LOG_PERROR, but that would change option semantics in other, unexpected ways. We could force calling passt_vsyslog() as long as the mask is set to LOG_EMERG, but that complicates the logic in logging functions even further. Go the easy way for now: don't force printing to stderr with LOG_EMERG if LOG_PERROR is already set. We should seriously consider a rework of those logging functions at this point. Signed-off-by: Stefano Brivio <sbrivio@redhat.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'util.h')
0 files changed, 0 insertions, 0 deletions