Package: tdlogging
Class Based Logger for PythonInstallationpipinstalltdloggingDocConfiguration Filetdlogger.txtA config text file for TDLoggerexceptionlog exceptionscountlog counttimelog time elapsedreturnlog return valueexeclog allpollwhether to poll for tdlogger.txt changespoll_periodseconds between each pollTDLogger.pyTDLoggerPython Class__init__Constructorfile_pathpath of tdlogger.txtconfigcustom config in python dict that overrides tdlogger.txtaliasa name for your logger.config()Get the Logger decorator from its ConfigurationApplyDecoratorsPython FunctionParameterstarget_dirDirectory that is affectedimport_rootPython import name of your tdlogger instancevar_nameVariable name of the TDLogger instance in your fileforceWhether to ignore applying at the current file levelverboseWhether to log changesDANGEROUS, use with cautionApply decorators to every python file in the Directory, and also marking the fileRemoveDecoratorsPython FunctionParameterstarget_dirDirectory that is affectedimport_rootPython import name of your tdlogger instancevar_nameVariable name of the TDLogger instance in your fileforceApply Changes without confirmationverboseWhether to log changesDANGEROUS, use with cautionRemove decorators to every python file in the Directory, and also removing the mark headingsUsageExample📦example┣ 📂cool┃ ┣ 📂cooler┃ ┃ ┣ 📜sleep.py┃ ┃ ┗ 📜__init__.py┃ ┣ 📜fib.py┃ ┗ 📜__init__.py┣ 📜logger_instance.py┣ 📜playground.py┣ 📜tdlogger.txt┗ 📜__init__.py# example/tdlogger.txt

exception = False
count = False
exec = True
time = False
return = False
poll = False
poll_period = 5# example/cool/fib.pyclassFib:@staticmethoddefget_n(n):a=0b=1ifn==0:returnaelifn==1:returnbelse:foriinrange(2,n):c=a+ba=bb=creturnb# example/cool/cooler/sleep.pyimporttimeclassSleep:@staticmethoddefsleep(n):time.sleep(n)# example/logger_instance.pyfromtdlogging.tdloggerimportTDLoggerlogger=TDLogger(alias="My Custom Logger").config()# example/playground.pyfromtdlogging.tdloggerimportApplyDecorators,RemoveDecoratorsApplyDecorators(target_dir="cool",import_root="example.logger_instance",var_name="logger",force=True)foriinrange(12):fromexample.cool.cooler.sleepimportSleepfromexample.cool.fibimportFibprint(Fib.get_n(i))Sleep.sleep(1)RemoveDecorators(target_dir="cool",import_root="example.logger_instance",var_name="logger",force=True)>pythonexample/playground.py

Added6linesto2file(s).
┎────────────────────────────┒
┃--MethodExecution--┃
┃Alias:MyCustomLogger┃
┃Class:Fib┃
┃Method:get_n┃
┃Count:1┃
┃ExecTime:0.000s┃
┃ReturnValue:0┃
┃ReturnType:<class'int'>┃
┃Arguments:{┃
┃'n':0┃
┃}┃
┃tdlogger┃
┖────────────────────────────┚0┎─────────────────────────────────┒
┃--MethodExecution--┃
┃Alias:MyCustomLogger┃
┃Class:Sleep┃
┃Method:sleep┃
┃Count:1┃
┃ExecTime:1.001s┃
┃ReturnValue:None┃
┃ReturnType:<class'NoneType'>┃
┃Arguments:{┃
┃'n':1┃
┃}┃
┃tdlogger┃
┖─────────────────────────────────┚3.
.
.

┎─────────────────────────────────┒
┃--MethodExecution--┃
┃Alias:MyCustomLogger┃
┃Class:Sleep┃
┃Method:sleep┃
┃Count:12┃
┃ExecTime:1.000s┃
┃ReturnValue:None┃
┃ReturnType:<class'NoneType'>┃
┃Arguments:{┃
┃'n':1┃
┃}┃
┃tdlogger┃
┖─────────────────────────────────┚

Removed6linesfrom2file(s).

Processfinishedwithexitcode0Change log[0.0.5] - 2020-04-12AddedApplyDecorator()RemoveDecorator()[0.0.4] - 2020-04-02Fixed unable to install[0.0.3] - 2020-04-02Fixed Markdown file[0.0.2] - 2020-04-02Addedtdprinter.pyEditedtdprinter.pytdlogger.py[0.0.1] - 2020-04-01Addedtdlogger.pyHISTORY.mdREADME.md