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
Post a Comment