utils.logmixin — Colorized logging¶
-
class
ievv_opensource.utils.logmixin.Logger(name, level=None)[source]¶ Bases:
objectLogger class used by
LogMixin.Parameters: name – The name of the logger. -
classmethod
get_instance(name, level=None, command_error_message=None)[source]¶ Get an instance of the logger by the given name.
Parameters: name – The name of the logger.
-
command_start(message)[source]¶ Log the start of a command. This should be used in the beginning of each
ievv_opensource.utils.ievvbuildstatic.pluginbase.Plugin.run().
-
command_error(message)[source]¶ Log failing end of a command. This should be used in
ievv_opensource.utils.ievvbuildstatic.pluginbase.Plugin.run()when the task fails.
-
command_success(message)[source]¶ Log successful end of a command. This should be used in
ievv_opensource.utils.ievvbuildstatic.pluginbase.Plugin.run()when the task succeeds.
-
classmethod
-
class
ievv_opensource.utils.logmixin.LogMixin[source]¶ Bases:
objectMixin class that takes care of logging for all the classes in the
ievvbuildstaticpackage.Subclasses must override
get_logger_name(), and useget_logger().-
get_logger()[source]¶ Get an instance of
Logger()withget_logger_name()as the logger name.
-