loghelper: logging, execution, command lines

command line

pyquickhelper.loghelper.run_cmd (cmd, sin = ‘’, shell = False, wait = False, log_error = True, stop_running_if = None, encerror = ‘ignore’, encoding = ‘utf8’, change_path = None, communicate = True, preprocess = True, timeout = None, catch_exit = False, fLOG = None, tell_if_no_output = None, prefix_log = None)

Runs a command line and wait for the result.

execution

pyquickhelper.loghelper.time_helper.repeat_execution (fct, every_second = 1, stop_after_second = 5, verbose = 0, fLOG = None, exc = True)

Runs a function on a regular basis. The function is not multithreaded, it returns when all execution are done.

pyquickhelper.loghelper.time_helper.repeat_script_execution (script, every_second = 1, stop_after_second = 5, outfile = None, errfile = None, verbose = 0, fLOG = None, exc = True)

Runs a python script on a regular basis. The function is not multithreaded, it returns when all execution are done.

github

pyquickhelper.loghelper.github_api.call_github_api (owner, repo, ask, auth = None, headers = None)

logging

pyquickhelper.loghelper.fLOG (args, kwargs)

Builds a message on a single line with the date, it deals with encoding issues.

pyquickhelper.loghelper.noLOG (args, kwargs)

does nothing

pyquickhelper.loghelper.CustomLog (self, folder = None, filename = None, create = True, parent = None)

Implements a custom logging function. This class is not protected against multithreading. Usage…

fLOG (self, args, kwargs)

Builds a message on a single line with the date, it deals with encoding issues.