Repository navigation
API Logging
Alexandre 'kidev' Poumaroux edited this page Oct 25, 2026
·
9 revisions
from proleak import logUnified logging. from proleak import log then log.info("...").
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.
| Class | Description |
|---|---|
Logger |
A logger bound to one plugin id (ctx.log in on_load). |
# A logger bound to one plugin id (ctx.log in on_load).
class LoggerDetails
def on_load(ctx):
ctx.log.info(f"loaded from {ctx.dir}")| Method | Returns | Description |
|---|---|---|
debug(message: object) |
None |
Log at debug level as this logger's plugin. |
info(message: object) |
None |
Log at info level as this logger's plugin. |
warning(message: object) |
None |
Log at warning level as this logger's plugin. |
error(message: object) |
None |
Log at error level as this logger's plugin. |
# Log at debug level as this logger's plugin.
def debug(message: object) -> NoneDetails
| Argument | Type | Default | Description |
|---|---|---|---|
message |
object |
required | What to log; a value other than a string is logged as str(message). |
# Log at info level as this logger's plugin.
def info(message: object) -> NoneDetails
| Argument | Type | Default | Description |
|---|---|---|---|
message |
object |
required | What to log; a value other than a string is logged as str(message). |
# Log at warning level as this logger's plugin.
def warning(message: object) -> NoneDetails
| Argument | Type | Default | Description |
|---|---|---|---|
message |
object |
required | What to log; a value other than a string is logged as str(message). |
# Log at error level as this logger's plugin.
def error(message: object) -> NoneDetails
| Argument | Type | Default | Description |
|---|---|---|---|
message |
object |
required | What to log; a value other than a string is logged as str(message). |
| Function | Returns | Description |
|---|---|---|
debug(message: object) |
None |
Log at debug level as the calling plugin. |
info(message: object) |
None |
Log at info level as the calling plugin. |
warning(message: object) |
None |
Log at warning level as the calling plugin. |
error(message: object) |
None |
Log at error level as the calling plugin. |
route_stdio() |
None |
Send print() and the logging module to ProLeak's log. |
# Log at debug level as the calling plugin.
def debug(message: object) -> NoneDetails
| Argument | Type | Default | Description |
|---|---|---|---|
message |
object |
required | What to log; a value other than a string is logged as str(message). |
# Log at info level as the calling plugin.
def info(message: object) -> NoneDetails
| Argument | Type | Default | Description |
|---|---|---|---|
message |
object |
required | What to log; a value other than a string is logged as str(message). |
# Log at warning level as the calling plugin.
def warning(message: object) -> NoneDetails
| Argument | Type | Default | Description |
|---|---|---|---|
message |
object |
required | What to log; a value other than a string is logged as str(message). |
# Log at error level as the calling plugin.
def error(message: object) -> NoneDetails
| Argument | Type | Default | Description |
|---|---|---|---|
message |
object |
required | What to log; a value other than a string is logged as str(message). |
# Send print() and the logging module to ProLeak's log.
def route_stdio() -> NoneUsing ProLeak
Features
Tutorial
- Your first plugin
- Plugin basics
- Handling events
- Plugin settings
- User interface
- Players, units and game data
- Purchases, signals and pings
- Chat, camera, input and more
- Game assets
- Game modes
- Game updates
- Publishing plugins
Reference