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

jquery - How do you format the date used in the popover widget title of FullCalendar? -

Bubble Sort Manually a Linked List in Java -

asp.net mvc - SSO between MVCForum and Umbraco7 -