kameloso.plugins.printer.logging

Implementation of Printer plugin functionality that concerns logging. For internal use.

The IRCEvent-annotated handlers must be in the same module as the AdminPlugin, but these implementation functions can be offloaded here to limit module size a bit.

Members

Functions

commitAllLogsImpl
void commitAllLogsImpl(PrinterPlugin plugin)

Writes all buffered log lines to disk.

commitLog
void commitLog(PrinterPlugin plugin, LogLineBuffer buffer)

Writes a single log buffer to disk.

escapedPath
auto escapedPath(string path)

Replaces some invalid filenames to something that can be stored on the filesystem.

establishLogLocation
auto establishLogLocation(string logLocation, uint connectionID)

Verifies that a log directory exists, complaining if it's invalid, creating it if it doesn't exist.

onLoggableEventImpl
void onLoggableEventImpl(PrinterPlugin plugin, IRCEvent event)

Logs an event to disk.

Structs

LogLineBuffer
struct LogLineBuffer

A struct containing lines to write to a log file when next committing such.

See Also

Meta