Skip to content

API Logging

Alexandre 'kidev' Poumaroux edited this page Oct 21, 2026 · 5 revisions

Logging

Import from proleak import log

Unified logging. from proleak import log then log.info("...").

Classes

Class
Logger A logger bound to one plugin id (ctx.log in on_load).

Functions

Returns Function
None debug(message: object) Log at debug level as the calling plugin.
None info(message: object) Log at info level as the calling plugin.
None warning(message: object) Log at warning level as the calling plugin.
None error(message: object) Log at error level as the calling plugin.
None route_stdio() Send print() and the logging module to ProLeak's log.

Detailed description

Lines go to the BepInEx console, ProLeak/logs/<plugin>.log, the Mods menu log tab and the event stream. print and the logging module end up in the same place.

Function documentation

debug

debug(message: object) -> None

Log at debug level as the calling plugin.

info

info(message: object) -> None

Log at info level as the calling plugin.

warning

warning(message: object) -> None

Log at warning level as the calling plugin.

error

error(message: object) -> None

Log at error level as the calling plugin.

route_stdio

route_stdio() -> None

Send print() and the logging module to ProLeak's log.

Logger class

A logger bound to one plugin id (ctx.log in on_load).

Returns Method
None debug(message: object) Log at debug level as this logger's plugin.
None info(message: object) Log at info level as this logger's plugin.
None warning(message: object) Log at warning level as this logger's plugin.
None error(message: object) Log at error level as this logger's plugin.

Method documentation

debug

debug(message: object) -> None

Log at debug level as this logger's plugin.

info

info(message: object) -> None

Log at info level as this logger's plugin.

warning

warning(message: object) -> None

Log at warning level as this logger's plugin.

error

error(message: object) -> None

Log at error level as this logger's plugin.


Previous: Game state | Next: Mouse and keyboard

Clone this wiki locally