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

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -