mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-06 04:40:32 +01:00
logging: remove nm_logging_syslog_closelog()
Remove nm_logging_syslog_closelog(). The reasons are:
- closelog() is optional according to the manual.
- we called nm_logging_syslog_closelog() at the end of the
main() function. But we have destructors running afterwards,
so we were closing the log before logging the last line.
Apparently that had no bad consequences either, so why was
closelog() even useful?
Also, it's hard to determine when we log the last line and
only closelog() afterwards.
- closelog() does not revert what openlog() did, this is ugly.
This commit is contained in:
parent
09ba572174
commit
9020cd1aac
4 changed files with 0 additions and 11 deletions
|
|
@ -486,8 +486,6 @@ main (int argc, char *argv[])
|
|||
done:
|
||||
g_clear_object (&manager);
|
||||
|
||||
nm_logging_syslog_closelog ();
|
||||
|
||||
if (global_opt.pidfile && wrote_pidfile)
|
||||
unlink (global_opt.pidfile);
|
||||
|
||||
|
|
|
|||
|
|
@ -481,8 +481,6 @@ main (int argc, char *argv[])
|
|||
|
||||
g_clear_pointer (&hwaddr, g_byte_array_unref);
|
||||
|
||||
nm_logging_syslog_closelog ();
|
||||
|
||||
if (pidfile && wrote_pidfile)
|
||||
unlink (pidfile);
|
||||
|
||||
|
|
|
|||
|
|
@ -488,9 +488,3 @@ nm_logging_syslog_openlog (gboolean debug)
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
nm_logging_syslog_closelog (void)
|
||||
{
|
||||
if (syslog_opened)
|
||||
closelog ();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -164,6 +164,5 @@ gboolean nm_logging_setup (const char *level,
|
|||
char **bad_domains,
|
||||
GError **error);
|
||||
void nm_logging_syslog_openlog (gboolean debug);
|
||||
void nm_logging_syslog_closelog (void);
|
||||
|
||||
#endif /* __NETWORKMANAGER_LOGGING_H__ */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue