This is an automated email from the git hooks/post-receive script.
teigland pushed a commit to branch master in repository sanlock.
commit 88b7726e71da241c801bb23a7bd3833ee0f91a2e Author: David Teigland teigland@redhat.com AuthorDate: Thu Aug 22 15:41:58 2024 -0500
sanlock: change log level for resource names
Stop writing every resource name and location to sanlock.log by default. Also fix names_log_priority (set in sanlock.conf) which controls the log level for the resource names, and was being ignored. --- src/main.c | 2 +- src/resource.c | 3 ++- src/sanlock.8 | 4 ++-- src/sanlock.conf | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/src/main.c b/src/main.c index 82872fa..6f63bf8 100644 --- a/src/main.c +++ b/src/main.c @@ -4222,7 +4222,7 @@ int main(int argc, char *argv[]) com.kill_grace_seconds = DEFAULT_GRACE_SEC; com.high_priority = DEFAULT_HIGH_PRIORITY; com.mlock_level = DEFAULT_MLOCK_LEVEL; - com.names_log_priority = LOG_WARNING; + com.names_log_priority = LOG_INFO; com.max_worker_threads = DEFAULT_MAX_WORKER_THREADS; com.io_timeout = DEFAULT_IO_TIMEOUT; com.write_init_io_timeout = DEFAULT_WRITE_INIT_IO_TIMEOUT; diff --git a/src/resource.c b/src/resource.c index 388e737..6cbfbf0 100644 --- a/src/resource.c +++ b/src/resource.c @@ -1974,7 +1974,8 @@ int acquire_token(struct task *task, struct token *token, uint32_t cmd_flags,
if (new_id) { /* save a record of what this id is for later debugging */ - log_warnt(token, "resource %.48s:%.48s:%.256s:%llu", + log_level(token->space_id, token->res_id, NULL, com.names_log_priority, + "resource %.48s:%.48s:%.256s:%llu", token->r.lockspace_name, token->r.name, token->r.disks[0].path, diff --git a/src/sanlock.8 b/src/sanlock.8 index f91933b..23774a1 100644 --- a/src/sanlock.8 +++ b/src/sanlock.8 @@ -1306,10 +1306,10 @@ syslog_priority = 3 See -S
.IP [bu] 2 -names_log_priority = 4 +names_log_priority = 6 .br Log resource names at this priority level (uses syslog priority numbers). -If this is greater than or equal to logfile_priority, each requested resource +If this number less than or equal to logfile_priority, each requested resource name and location is recorded in sanlock.log.
.IP [bu] 2 diff --git a/src/sanlock.conf b/src/sanlock.conf index 6fae7dd..325c37d 100644 --- a/src/sanlock.conf +++ b/src/sanlock.conf @@ -20,7 +20,7 @@ # syslog_priority = 3 # command line: -S 3 # -# names_log_priority = 4 +# names_log_priority = 6 # command line: n/a # # use_watchdog = 1
sanlock-devel@lists.fedorahosted.org