Do not log when logging is off, from Michael Grant.

This commit is contained in:
nicm
2026-08-05 07:27:45 +00:00
committed by tmux update bot
parent 3894397b07
commit 0198ee9e51

View File

@@ -1,4 +1,4 @@
/* $OpenBSD: format.c,v 1.410 2026/07/29 20:43:20 nicm Exp $ */
/* $OpenBSD: format.c,v 1.411 2026/08/05 07:27:45 nicm Exp $ */
/*
* Copyright (c) 2011 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -4182,6 +4182,8 @@ format_log_debug_cb(const char *key, const char *value, void *arg)
void
format_log_debug(struct format_tree *ft, const char *prefix)
{
if (log_get_level() == 0)
return;
format_each(ft, format_log_debug_cb, (void *)prefix);
}