Skip to content

rojack96/imhere

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ImHere

simple log for simple debug


ImHere is an alternative of a simple print for debugging.

Return print with:

  • Timestamp
  • File name
  • Context (function or class)
  • Line of code
  • Variable mame
  • Variable value

Get started

from imhere import ImHere

imhere = ImHere()

def function():
    variable = 97
    imhere.log(variable)

#[2021-11-26 19:44:50] test.py\function\line 6\variable:97

Change default settings

from imhere import ImHere, separator

imhere = ImHere(
   spr=separator.ARROW, 
   timestamp=True, 
   time_format="%y-%m-%d %H:%M:%S"
)

def function():
    variable = 97
    imhere.log(variable)

#[21-11-26 19:44:50] test.py->function->line 6->variable:97

Settings separator:

SLASH = '/'
BACKSLASH = '\\'
POINT = '.'
VERTICAL_BAR = '|'
HYPHEN = '-'
UNDERSCORE = '_'
ARROW = '->'

To disable the timestamp print, set timestamp=False

To change format timestamp, set time_format=formatTimestamp

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages