mindstalk: (Default)
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-04-03 16:43 (UTC)From: [personal profile] mtbc
mtbc: photograph of me (Default)
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.)

Profile

mindstalk: (Default)
mindstalk

June 2025

S M T W T F S
123 45 67
89 10 1112 1314
15161718192021
222324 25262728
2930     

Page Summary

Most Popular Tags

Expand Cut Tags

No cut tags

Style Credit

Page generated 2025-07-10 12:14
Powered by Dreamwidth Studios