mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-08-06 10:18:42 +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
|
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 = {}
|
runningProcesses = {}
|
||||||
|
|
||||||
|
|
|
@ -32,6 +32,15 @@ class Publish(desc.Node):
|
||||||
value="",
|
value="",
|
||||||
uid=[0],
|
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=[],
|
||||||
|
),
|
||||||
]
|
]
|
||||||
|
|
||||||
def resolvedPaths(self, inputFiles, outDir):
|
def resolvedPaths(self, inputFiles, outDir):
|
||||||
|
@ -42,6 +51,8 @@ class Publish(desc.Node):
|
||||||
return paths
|
return paths
|
||||||
|
|
||||||
def processChunk(self, chunk):
|
def processChunk(self, chunk):
|
||||||
|
chunk.log.logger.setLevel(chunk.log.textToLevel(chunk.node.verboseLevel.value))
|
||||||
|
|
||||||
if not chunk.node.inputFiles:
|
if not chunk.node.inputFiles:
|
||||||
chunk.log.add('Nothing to publish', logging.WARNING)
|
chunk.log.add('Nothing to publish', logging.WARNING)
|
||||||
return
|
return
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue