libretro.api.log¶
Types for allowing Cores to log messages.
See also
LogDriverThe protocol that uses these types to implement logging support in libretro.py.
libretro.drivers.loglibretro.py’s included
LogDriverimplementations.
Module Attributes
Log a message at the given severity level. |
Classes
libretro's defined log severity levels. |
|
Provides the |
- class LogLevel[source]¶
Bases:
IntEnumlibretro’s defined log severity levels.
Corresponds to
retro_log_levelinlibretro.h.- DEBUG = 0¶
- INFO = 1¶
- WARNING = 2¶
- ERROR = 3¶
- property logging_level¶
Returns the equivalent
logginglevel.>>> import logging >>> from libretro.api import LogLevel >>> LogLevel.WARNING.logging_level == logging.WARN True
- __new__(value)¶
- classmethod value in self¶
Return True if value is in cls.
value is in cls if: 1) value is a member of cls, or 2) value is the value of one of the cls’s members. 3) value is a pseudo-member (flags)
- classmethod self[name]¶
Return the member matching name.
- __init__()¶
- classmethod iter(self)¶
Return members in definition order.
- classmethod len(self)¶
Return the number of members (no aliases)
- class retro_log_callback[source]¶
Bases:
StructureProvides the
Corewith a logging function.Corresponds to
retro_log_callbackinlibretro.h.- log¶
A printf-style logging function. Set by the frontend.
See also
LogDriver.logThe suggested entry point for this callback in libretro.py.
- __deepcopy__(_)[source]¶
Return a copy of this object. Intended for use with
copy.deepcopy().
- __init__(*args, **kwargs)¶
- classmethod __new__(*args, **kwargs)¶
- retro_log_printf_t¶
Log a message at the given severity level.
Registered by the frontend and called by the core to write a
printf-style message to the frontend’s log.- Parameters:
Warning
retro_log_printf_tnormally hasprintf-style variadic arguments, butctypesdoesn’t currently support variadic callbacks.As a workaround, your
Corecan format log messages withsprintfor similar, then pass the result as the format string.Corresponds to
retro_log_printf_tinlibretro.h.See also
LogDriver.logThe suggested entry point for this callback in libretro.py.