cmdline_s4: re-initialise logging once loadparm is ready
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Thu, 26 May 2022 03:46:08 +0000 (15:46 +1200)
committerJule Anger <janger@samba.org>
Sat, 18 Jun 2022 08:47:17 +0000 (08:47 +0000)
commitedd5a851273cdbece6aba3d22241e469e58bed9a
tree527ee23e57e06149290f6aed08c7329b42810bb3
parent1137957a13b733babd988831ce3e7cf67ac77526
cmdline_s4: re-initialise logging once loadparm is ready

The first time round we maybe didn't know which files we wanted to log to.
Suppose, for example, we had an smb.conf with

 log level = 1 dsdb_group_json_audit:5@/var/log/group_json.log

we wouldn't see anything in "/var/log/group_json.log", while the level
5 dsdb_group_json_audit messages would go into the main log.

Note that the named file would still be opened by winbindd and others
that use the s3 code, but would remain empty as they don't have anything
to say about dsdb_group_json_audit.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15076

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
(cherry picked from commit 9537ac723cfdc43e718fdd08dc28883e7057a372)
lib/cmdline/cmdline_s4.c