[v2,4/5] unbound-dhcp-leases-bridge: Initialize logging after daemonization

Message ID 20220330095635.621181-4-michael.tremer@ipfire.org
State Accepted
Commit f961135513cdd6f5e64d91bc6477fcf8a6df941a
Headers
Series [v2,1/5] unbound-dhcp-leases-bridge: Improve logging |

Commit Message

Michael Tremer March 30, 2022, 9:56 a.m. UTC
  Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
---
 config/unbound/unbound-dhcp-leases-bridge | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
  

Patch

diff --git a/config/unbound/unbound-dhcp-leases-bridge b/config/unbound/unbound-dhcp-leases-bridge
index b098d98b4..50a0e516a 100644
--- a/config/unbound/unbound-dhcp-leases-bridge
+++ b/config/unbound/unbound-dhcp-leases-bridge
@@ -615,8 +615,6 @@  if __name__ == "__main__":
 		elif args.verbose >= 2:
 			loglevel = logging.DEBUG
 
-	setup_logging(daemon=args.daemon, loglevel=loglevel)
-
 	bridge = UnboundDHCPLeasesBridge(args.dhcp_leases, args.fix_leases,
 		args.unbound_leases, args.hosts)
 
@@ -627,4 +625,6 @@  if __name__ == "__main__":
 	}
 
 	with ctx:
+		setup_logging(daemon=args.daemon, loglevel=loglevel)
+
 		bridge.run()