MCPcopy
hub / github.com/KhronosGroup/Vulkan-Docs / logHeader

Function logHeader

scripts/reflib.py:46–57  ·  view source on GitHub ↗

Generate prefix for a diagnostic line using metadata and severity

(severity)

Source from the content-addressed store, hash-verified

44 logLine = line
45
46def logHeader(severity):
47 """Generate prefix for a diagnostic line using metadata and severity"""
48 global logSourcefile, logProcname, logLine
49
50 msg = f'{severity}: '
51 if logProcname:
52 msg = f'{msg} in {logProcname}'
53 if logSourcefile:
54 msg = f'{msg} for {logSourcefile}'
55 if logLine:
56 msg = f'{msg} line {str(logLine)}'
57 return f'{msg} '
58
59def setLogFile(setDiag, setWarn, filename):
60 """Set the file handle to log either or both warnings and diagnostics to.

Callers 3

logDiagFunction · 0.85
logWarnFunction · 0.85
logErrFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected