(Logger):getAncestry
Used internally to get all hierarchy of the current Logger. The array is in "reverse", with the first logger at the first position, and the next one is the one the current Logger was (Logger):extended from.
This is useful if you're writing your own log sink.
Synopsis
Parameters
None.
Returns
ancestryDatatable-
An array of the logger's ancestry information.
ancestryData[1]will be the upmost root,ancestryData[#ancestryData]will be the Logger that called the function.Each entry in the table, is a table with the two fields
namestring andcolorDefcolor
Examples
local ancestryData = Logger:getAncestry()
local prefixParts = { }
for _, node in ipairs(ancestryData) do
table.insert(prefixParts, node.name)
end
print(table.concat(prefixParts, ":"))