The branch, master has been updated
via 9b30fcda640 s3:debug: enable logging for early startup failures
via a45675879dd s3:debug: adjust indention
via b9e1b4ad003 s3:debug: use struct initializer
from f7082723503 nsswitch: Fix usage information of
test_wbinfo_name_lookup.sh
https://git.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 9b30fcda64080592d20de64b384fd6d3d0775cbf
Author: Ralph Wuerthner <[email protected]>
Date: Mon Mar 25 15:17:07 2019 +0100
s3:debug: enable logging for early startup failures
Commit c89a33a07a 'debug: Use backends instead of explicitly logging to
syslog or file' introduced a regression where early startup failures (e.g.
unable to connect to CTDB) are no longer logged because the debug subsystem
is not yet fully initialized. Enable logging again with reasonable defaults
when reopen_logs() is called and the parameter file is not yet parsed.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13904
Signed-off-by: Ralph Wuerthner <[email protected]>
Reviewed-by: Stefan Metzmacher <[email protected]>
Reviewed-by: Christof Schmitt <[email protected]>
Autobuild-User(master): Christof Schmitt <[email protected]>
Autobuild-Date(master): Thu Apr 18 22:21:15 UTC 2019 on sn-devel-144
commit a45675879ddcb43ab274d28496eedd6833466ae4
Author: Ralph Wuerthner <[email protected]>
Date: Thu Apr 11 13:11:34 2019 +0200
s3:debug: adjust indention
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13904
Signed-off-by: Ralph Wuerthner <[email protected]>
Reviewed-by: Stefan Metzmacher <[email protected]>
Reviewed-by: Christof Schmitt <[email protected]>
commit b9e1b4ad0033c211710da285c30d603ccb8b8d40
Author: Ralph Wuerthner <[email protected]>
Date: Thu Apr 11 13:01:16 2019 +0200
s3:debug: use struct initializer
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13904
Signed-off-by: Ralph Wuerthner <[email protected]>
Reviewed-by: Stefan Metzmacher <[email protected]>
Reviewed-by: Christof Schmitt <[email protected]>
-----------------------------------------------------------------------
Summary of changes:
lib/util/debug_s3.c | 44 ++++++++++++++++++++++++++++++++------------
1 file changed, 32 insertions(+), 12 deletions(-)
Changeset truncated at 500 lines:
diff --git a/lib/util/debug_s3.c b/lib/util/debug_s3.c
index 479348a7310..5384ac1718a 100644
--- a/lib/util/debug_s3.c
+++ b/lib/util/debug_s3.c
@@ -31,21 +31,41 @@
bool reopen_logs(void)
{
if (lp_loaded()) {
- struct debug_settings settings;
+ struct debug_settings settings = {
+ .max_log_size = lp_max_log_size(),
+ .timestamp_logs = lp_timestamp_logs(),
+ .debug_prefix_timestamp = lp_debug_prefix_timestamp(),
+ .debug_hires_timestamp = lp_debug_hires_timestamp(),
+ .debug_pid = lp_debug_pid(),
+ .debug_uid = lp_debug_uid(),
+ .debug_class = lp_debug_class(),
+ };
debug_set_logfile(lp_logfile(talloc_tos()));
debug_parse_levels(lp_log_level(talloc_tos()));
-
- ZERO_STRUCT(settings);
- settings.max_log_size = lp_max_log_size();
- settings.timestamp_logs = lp_timestamp_logs();
- settings.debug_prefix_timestamp = lp_debug_prefix_timestamp();
- settings.debug_hires_timestamp = lp_debug_hires_timestamp();
- settings.debug_pid = lp_debug_pid();
- settings.debug_uid = lp_debug_uid();
- settings.debug_class = lp_debug_class();
- debug_set_settings(&settings, lp_logging(talloc_tos()),
- lp_syslog(), lp_syslog_only());
+ debug_set_settings(&settings,
+ lp_logging(talloc_tos()),
+ lp_syslog(),
+ lp_syslog_only());
+ } else {
+ /*
+ * Parameters are not yet loaded - configure debugging with
+ * reasonable defaults to enable logging for early
+ * startup failures.
+ */
+ struct debug_settings settings = {
+ .max_log_size = 5000,
+ .timestamp_logs = true,
+ .debug_prefix_timestamp = false,
+ .debug_hires_timestamp = true,
+ .debug_pid = false,
+ .debug_uid = false,
+ .debug_class = false,
+ };
+ debug_set_settings(&settings,
+ "file",
+ 1,
+ false);
}
return reopen_logs_internal();
}
--
Samba Shared Repository