xobox’ Application Configuration¶
xobox’ application configuration module provides an interface for accessing
built-in default configuration constants. Instead of scattering default constants
all over the application’s code, default values shall be centralized in
xobox.conf.default
. This being the case, these configuration defaults
can be accessed by either the function interface, or by a class interface.
Function Interface¶
Class Interface¶
-
class
xobox.conf.
ApplicationConf
¶ -
get_instance
(*args, **kwargs)¶ Obtain the reference to the instance of
ApplicationConf
. If no instance exists yet, one will be created and its reference returned.Note
Although the
get_instance()
method accepts arbitrary positional and keyword arguments, they will be ignored by the constructor.
-
Default Configuration Values¶
Core Settings¶
-
xobox.conf.default.
DEFAULT_CHARSET
= 'utf-8'¶ Default character set to be used for any byte sequence or string conversion operations
-
xobox.conf.default.
DEFAULT_XOBOX_EXECUTABLE
= 'travis-sphinx'¶ Default xobox Executable
-
xobox.conf.default.
DEFAULT_CONF_FILE
= '/home/travis/.config/xobox/xobox.ini'¶ Default configuration file name
Logging Settings¶
-
xobox.conf.default.
DEFAULT_LOG_TYPE
= 'term'¶ Default log type
-
xobox.conf.default.
DEFAULT_LOG_LEVEL
= 'notice'¶ Default log level
-
xobox.conf.default.
DEFAULT_LOG_FILE
= '/home/travis/.cache/xobox/xobox.log'¶ Default log file
-
xobox.conf.default.
DEFAULT_LOG_TIMESTAMP
= '%Y-%m-%d %H:%M:%S'¶ Default timestamp format for file logging
-
xobox.conf.default.
DEFAULT_LOG_COLOR
= True¶ By default, use colors for logging where available