mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-08-01 07:48:37 +02:00
expose verbose level on Publish node
This commit is contained in:
parent
5ef33ef64c
commit
cd5beab5f4
2 changed files with 19 additions and 0 deletions
|
@ -213,6 +213,14 @@ class LogManager:
|
|||
|
||||
self.progressBar = False
|
||||
|
||||
def textToLevel(self, text):
|
||||
if text == 'critical': return logging.CRITICAL
|
||||
elif text == 'error': return logging.ERROR
|
||||
elif text == 'warning': return logging.WARNING
|
||||
elif text == 'info': return logging.INFO
|
||||
elif text == 'debug': return logging.DEBUG
|
||||
else: return logging.NOTSET
|
||||
|
||||
|
||||
runningProcesses = {}
|
||||
|
||||
|
|
|
@ -31,6 +31,15 @@ class Publish(desc.Node):
|
|||
description="",
|
||||
value="",
|
||||
uid=[0],
|
||||
),
|
||||
desc.ChoiceParam(
|
||||
name='verboseLevel',
|
||||
label='Verbose Level',
|
||||
description='''verbosity level (critical, error, warning, info, debug).''',
|
||||
value='info',
|
||||
values=['critical', 'error', 'warning', 'info', 'debug'],
|
||||
exclusive=True,
|
||||
uid=[],
|
||||
),
|
||||
]
|
||||
|
||||
|
@ -42,6 +51,8 @@ class Publish(desc.Node):
|
|||
return paths
|
||||
|
||||
def processChunk(self, chunk):
|
||||
chunk.log.logger.setLevel(chunk.log.textToLevel(chunk.node.verboseLevel.value))
|
||||
|
||||
if not chunk.node.inputFiles:
|
||||
chunk.log.add('Nothing to publish', logging.WARNING)
|
||||
return
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue