Organize your logs by categories for easy filtering:
log.add(log.section("network"), "Connection established")
log.error(log.section("database"), "Query failed")
log.debug(log.section("parser"), "Token found:", token)Creates an object bound to a specific section:
local netLog = log.inSection("network")
netLog.add("Connecting to server...")
netLog.add("Response received")
netLog.error("Timeout!")
netLog("Shortcut for add") -- can call directlylog.setDefaultSection("game")
log.add("Player spawned") -- goes to "game" section
log.add("Score: 100") -- goes to "game" section-- Show only one section
log.show("network")
-- Show multiple sections
log.show({"network", "database"})
-- Save with filter
log.save("./", "network.log", "network")
log.save("./", "errors.log", {"network", "database"})
-- List available sections
print(table.concat(log.getSections(), ", "))