Skip to main content

NullHandler

An implementation of Handler which does nothing with Records. Modules may elect to disable Logger.propagate to prevent logs from bubbling up to the root logger. In this case, to avoid an "unhandled log" warning, add a NullHandler.

Functions

new

since 0.1.0
</>
NullHandler.new() → NullHandler

Creates a NullHandler.

emit

since 0.1.0
</>
NullHandler:emit(_record: Record) → ()

Does nothing except give you an overwhelming feeling that everything is going to be OK.

Show raw api
{
    "functions": [
        {
            "name": "new",
            "desc": "Creates a NullHandler.",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "NullHandler"
                }
            ],
            "function_type": "static",
            "since": "0.1.0",
            "source": {
                "line": 18,
                "path": "Logging/Handler/NullHandler.lua"
            }
        },
        {
            "name": "emit",
            "desc": "Does nothing except give you an overwhelming feeling that everything is going to be OK.",
            "params": [
                {
                    "name": "_record",
                    "desc": "",
                    "lua_type": "Record"
                }
            ],
            "returns": [],
            "function_type": "method",
            "since": "0.1.0",
            "source": {
                "line": 32,
                "path": "Logging/Handler/NullHandler.lua"
            }
        }
    ],
    "properties": [],
    "types": [],
    "name": "NullHandler",
    "desc": "An implementation of [Handler] which does nothing with [Record]s.\nModules may elect to disable [Logger.propagate] to prevent logs\nfrom bubbling up to the root logger. In this case, to avoid an\n\"unhandled log\" warning, add a NullHandler.",
    "source": {
        "line": 8,
        "path": "Logging/Handler/NullHandler.lua"
    }
}