mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-python
synced 2026-01-15 01:52:56 +01:00
slog_m(): Support kwarg "caller"
Treat slog_m() to a caller keyword argument, up to now only supported by slog(). Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
70bfb51948
commit
79ebb798c7
1 changed files with 5 additions and 1 deletions
|
|
@ -88,7 +88,11 @@ def slog_m(prio, *args, **kwargs): # export
|
|||
margs += '\n'.join([str(elem) for elem in a])
|
||||
continue
|
||||
margs += ' ' + str(a)
|
||||
caller = get_caller_pos(1)
|
||||
if 'caller' not in kwargs:
|
||||
caller = get_caller_pos(1)
|
||||
else:
|
||||
caller = kwargs['caller']
|
||||
del kwargs['caller']
|
||||
for line in margs[1:].split('\n'):
|
||||
slog(prio, line, **kwargs, caller=caller)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue