mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 23:49:33 +00:00
Uses the error logging facility to print a plugins traceback
This commit is contained in:
parent
58a74d3b0c
commit
237a4a3659
1 changed files with 4 additions and 1 deletions
|
|
@ -808,8 +808,11 @@ local function load_metadata()
|
|||
|
||||
if not status then
|
||||
traceError(TRACE_ERROR, TRACE_CONSOLE, string.format("Could not load plugins metadata file '%s'", PLUGIN_RELATIVE_PATHS.metadata))
|
||||
-- Prints the traceback using multiple traceError to make sure it ends up completely as error in logging systems
|
||||
local tb = debug.traceback()
|
||||
traceError(TRACE_ERROR, TRACE_CONSOLE, string.format("%s", tb))
|
||||
for s in tb:gmatch("[^\r\n]+") do
|
||||
traceError(TRACE_ERROR, TRACE_CONSOLE, string.format("%s", s))
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue