Settings and Enumerations

class Config[source]

A dict-like object that contains the settings for Plogpro

This class is a singleton, which means that every instance contains the same info and changes to any instance will also apply to every other instance. Use the standard instance config to avoid any confusion.

Settings can be accessed using square brackets, e.g.:

print(config['release'])

will print the type of release to the console. To change a setting, use the same syntax:

config['release'] = ReleaseType.DEBUG

will change the release type to DEBUG, which is the most verbose type. The list of attributes below shows the possible cofiguration settings.

Warning

Only change the settings at the beginning of your program. Changing the settings in a later stage can result in unexpected errors. For example, the setup() or teardown() methods that are available in most base classes will not be called if config['release'] == ReleaseType.RELEASE_QUIET, therefore a file that needs to be opened and closed in those methods will not be available is the type of release changes from ReleaseType.RELEASE_QUIET to a more verbose type after creating e.g. a logger or profiler.

release

The state of the software that uses Plogpro

Type

ReleaseType

class LogType(value)[source]

An enumeration for indicating the severity of a log message

DEBUG

Useful information for debugging only

INFO

General information

WARNING

A warning to the user

ERROR

Information about an error that has occurred

FATAL

Information about an error that resulted in a crash

class ReleaseType(value)[source]

An enumeration for indicating the state of the software using Plogpro

DEBUG

Everything is enabled and as verbose as possible

VERBOSE

Debugging log messages (LogType.DEBUG) are disabled, but other messages will still be shown and profilers still work

RELEASE

Only log messages indicating an error (LogType.ERROR or higher) are shown and profilers are disabled

RELEASE_QUIET

All loggers and profilers are disabled