InspIRCd v4 is still early in development!

If you use this branch you may experience crashes, weird behaviour, and unannounced breaking changes.

You probably want to use InspIRCd v3 instead.

The "log_json" Module (v4)

This module depends on a third-party library (RapidJSON) and must be manually enabled at compile time.

Once you have installed the dependency you can enable this module using the following command:

./configure --enable-extras log_json

Description

This module provides the ability to log to JSON.

Configuration

To load this module use the following <module> tag:

<module name="log_json">

<log>

This module extends the core <log> tags with the following fields:

Name Type Default Value Description
method Text None Required! This MUST be set to json, json-stderr, or json-stdout to use JSON logging.
target Text None Required! If using the json method the location to write the log to.
Example Usage

Logs JSON messages to inspircd.json:

<log method="json"
     target="inspircd.json"
     level="normal"
     type="* -USERINPUT -USEROUTPUT">

Logs JSON messages to the standard error stream:

<log method="json-stderr"
     level="normal"
     type="* -USERINPUT -USEROUTPUT">

Logs JSON messages to the standard output stream:

<log method="json-stdout"
     level="normal"
     type="* -USERINPUT -USEROUTPUT">