mindstalk: (Default)
[personal profile] mindstalk
The work system has two kinds of debug/logging statements.

One is a class with the standard methods (trace through critical) which are just print statements that add "DEBUG" or "INFO" as appropriate. There's not even a hint of output throttling. But it is a class, and so I can rip its guts out and replace them with calls to Python's logging module, and it works.

Then there's the 500+ naked print statements, with "ERROR" or such in their constructed output strings. I can search for them easily -- though I can just search for 'print', I think these are the only uses -- but I don't see any programmatic way of converting them, especially as the logging output formatting needs types (%s, %d) which are totally absent from the existing statements. (And it's python 2, so they are statements.)

I see a day of boring editing in my future.

Date: 2017-Apr-03, Monday 16:43 (UTC)
mtbc: photograph of me (Default)
From: [personal profile] mtbc
It's worth it, I guess. It's also nice to have menial jobs on the to-do list for the times when you still owe work hours but your brain just isn't inclined to think very hard about it all.

One of my jobs at Vecna was internationalization which included finding everywhere that output was generated and making it locale-sensitive. That was but one of my menial whole-codebase many-days tasks there. (We had started selling into France and whatnot.)

Page Summary

Most Popular Tags