python - Where to keep my log strings? -


i have application im logging lots of things, log strings long code gets messy. there standard way of storing them in file call them name when needed?

ie. have logger.error("a long string, logging sorts of stuff %s", variable)

of course! store them in log_strings.py(or similar) file , import them. instead of `f.write("this file crashed on _ error message _") (or whatever) can do

f.write(log_strings.error1)  #in /log_strings.py error1 = "this file crashed on _ error message _" 

Comments

Popular posts from this blog

shopping cart - Page redirect not working PHP -

php - How to modify a menu to show sub-menus -

python - Installing PyDev in eclipse is failed -