![]() |
![]()
| ![]() |
![]()
NAMEdnsjit.core.log - Core logging facility SYNOPSISUsage to control global log level local log = require("dnsjit.core.log")
Usage to control module log level local example = require("example") -- Example as below
Usage to control object instance log level local example = require("example") -- Example as below
Usage in C moduleNOTE naming of variables and module only globals are required to exactly as described in order for the macros to work; self is the pointer to the object instance, self->_log is the object instance logging configuration struct, _log is the module logging configuration struct. Include logging:
Add the logging struct to the module struct:
Add a module logging configuration and a struct default:
Use new/free and/or init/destroy functions (depends if you create
the object in Lua or not):
In the Lua part of the C module you need to create a function that returns either the object instance Log or the modules Log. Add C function to get module only Log:
For the structures metatable add the following function:
Usage in pure Lua module local log = require("dnsjit.core.log")
DESCRIPTIONCore logging facility used by all modules. Log levels
C macros
Functions
AUTHORS and CONTRIBUTORSJerry Lundström (DNS-OARC), Tomáš Křížek (CZ.NIC), Petr Špaček (ISC) Maintained by DNS-OARC https://www.dns-oarc.net/
BUGSFor issues and feature requests please use: https://github.com/DNS-OARC/dnsjit/issues
For question and help please use: admin@dns-oarc.net
|