Package libavg :: Module avg :: Class Logger

Class Logger


Interface to the logger used by the avg player. Enables the setting of different logging categories. Categories can be set either by calling Logger.setCategories or by setting the AVG_LOG_CATEGORIES environment variable. Default categories are ERROR, WARNING, and APP. Log output is sent to the console (stderr). Each log entry contains the time the message was written, the category of the entry and the message itself.

Instance Methods
 
__init__(...)
Raises an exception This class cannot be instantiated from Python
 
popCategories(...)
Pops the current set of categories from the internal stack, restoring the state when the corresponding push was called.
 
pushCategories(...)
Pushes the current set of categories on an internal stack.
 
setCategories(...)
Sets the types of messages that should be logged.
 
trace(...)
Logs message to the log if category is active.

Inherited from unreachable.instance: __new__

Inherited from object: __delattr__, __getattribute__, __hash__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Static Methods
 
get(...)
This method gives access to the logger.
Properties
  APP
  BLTS
  CONFIG
  ERROR
  EVENTS
  EVENTS2
  MEMORY
  NONE
  PLUGIN
  PROFILE
  PROFILE_LATEFRAMES
  WARNING

Inherited from object: __class__

Method Details

__init__(...)
(Constructor)

 

Raises an exception This class cannot be instantiated from Python

Overrides: object.__init__

get(...)
Static Method

 

This method gives access to the logger. There is only one instance.

pushCategories(...)

 

Pushes the current set of categories on an internal stack. Useful for saving and restoring the logging state so it can be changed for a short amount of time.

setCategories(...)

 

Sets the types of messages that should be logged.

Parameters:
  • categories - Or'ed list of categories. Possible categories are:
    • NONE: No logging except for errors.
    • BLTS: Display subsystem logging. Useful for timing/performance measurements.
    • PROFILE: Outputs performance statistics on player termination.
    • PROFILE_LATEFRAMES: Outputs performance statistics whenever a frame is displayed late.
    • EVENTS: Outputs basic event data.
    • EVENTS2: Outputs all event data available.
    • CONFIG: Outputs configuration data.
    • WARNING: Outputs warning messages.
    • ERROR: Outputs error messages. Can't be shut off.
    • MEMORY: Outputs open/close information whenever a media file is accessed.
    • APP: Reserved for application-level messages issued by python code.
    • PLUGIN: Messages generated by loading plugins.
    • PLAYER: General libavg playback messages.

trace(...)

 

Logs message to the log if category is active.

Parameters:
  • category - One of the categories listed for setCategories(). Should in most cases be APP.
  • message - The log message.

Property Details

APP

Get Method:
unreachable(...)

BLTS

Get Method:
unreachable(...)

CONFIG

Get Method:
unreachable(...)

ERROR

Get Method:
unreachable(...)

EVENTS

Get Method:
unreachable(...)

EVENTS2

Get Method:
unreachable(...)

MEMORY

Get Method:
unreachable(...)

NONE

Get Method:
unreachable(...)

PLUGIN

Get Method:
unreachable(...)

PROFILE

Get Method:
unreachable(...)

PROFILE_LATEFRAMES

Get Method:
unreachable(...)

WARNING

Get Method:
unreachable(...)