mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Don't acquire lock if there is no formatter
this cause locking when a log handler don't have a formatter (because it don't need one)
This commit is contained in:
parent
1fae76d53c
commit
0aa1416b6b
1 changed files with 4 additions and 4 deletions
|
@ -121,14 +121,14 @@ class SaltLoggingClass(with_metaclass(LoggingMixInMeta, LOGGING_LOGGER_CLASS, Ne
|
|||
LOGGING_TEMP_HANDLER):
|
||||
continue
|
||||
|
||||
if not handler.lock:
|
||||
handler.createLock()
|
||||
handler.acquire()
|
||||
|
||||
formatter = handler.formatter
|
||||
if not formatter:
|
||||
continue
|
||||
|
||||
if not handler.lock:
|
||||
handler.createLock()
|
||||
handler.acquire()
|
||||
|
||||
fmt = formatter._fmt.replace('%', '%%')
|
||||
|
||||
match = MODNAME_PATTERN.search(fmt)
|
||||
|
|
Loading…
Add table
Reference in a new issue