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 PrinterPlugin, but these implementation functions can be offloaded here to limit module size a bit.

Members

Functions

escapedPath
auto escapedPath(string path)

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

establishLogLocation
auto establishLogLocation(string logLocation, bool naggedAboutDir)

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

flushAllLogsImpl
void flushAllLogsImpl(PrinterPlugin plugin)

Writes all buffered log lines to disk.

flushLog
void flushLog(PrinterPlugin plugin, LogLineBuffer buffer)

Writes a single log buffer to disk.

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 flushing such.

See Also

Meta