Writes a formatted message at alert level. Additional values are substituted using Lua string.format.
string.format
`log.alert("bridge unavailable: %s", reason);` Copy
`log.alert("bridge unavailable: %s", reason);`
%DCS_INSTALL_DIR%/API/Sim_ControlAPI.md:234
TODO: exported by this DCS build but absent from the installed public API and Lua callsites; backup target semantics are not inferable safely.
%DCS_INSTALL_DIR%/API/Sim_ControlAPI.md:228
Writes a formatted message at debug level.
`log.debug("loaded %d records", count);` Copy
`log.debug("loaded %d records", count);`
Writes a formatted message at error level.
`log.error("failed to load %s", fileName);` Copy
`log.error("failed to load %s", fileName);`
Writes a formatted message at info level.
`log.info("mod initialized");` Copy
`log.info("mod initialized");`
Opens, reconfigures, or closes a log output. Passing empty subsystem and zero masks closes it.
`log.set_output("my-mod", "MyMod", log.ALL, log.FULL);` Copy
`log.set_output("my-mod", "MyMod", log.ALL, log.FULL);`
%DCS_INSTALL_DIR%/API/Sim_ControlAPI.md:247
TODO: exported by this DCS build but absent from the installed public API and Lua callsites; the rules schema is intentionally unknown.
unknown
Writes a formatted message at warning level.
`log.warning("missing optional file: %s", fileName);` Copy
`log.warning("missing optional file: %s", fileName);`
Writes a message for an explicit subsystem and log-level constant.
`log.write("MyMod", log.INFO, "initialized %s", version);` Copy
`log.write("MyMod", log.INFO, "initialized %s", version);`
No Self
See