search for: s_upsdebug_ascii

Displaying 3 results from an estimated 3 matches for "s_upsdebug_ascii".

2023 Jan 15
1
logging strategy
...The `configure` script tries some fallbacks for > __func__ but not for others. Thanks - I may try that, but I think I'm trying to write debug statements that are sort of human readable without code refs and also easily findable in the code. But ack that __func__ is acceptable. > As for s_upsdebug_ascii() - I do not think it is a perfectly good idea to > change it (maybe is - not much used in NUT codebase; but possibly some > forks have more use for it). > It sounds reasonable however to define and implement a different method for > this purpose, when you expect that sort of content -...
2023 Jan 15
1
logging strategy
...ern compilers providing the __func__ macro. Technically also __FILE__ and __LINE__ may be used. Neither is guaranteed across the portability board however, but that is likely to only bite very old systems nowadays. The `configure` script tries some fallbacks for __func__ but not for others. As for s_upsdebug_ascii() - I do not think it is a perfectly good idea to change it (maybe is - not much used in NUT codebase; but possibly some forks have more use for it). It sounds reasonable however to define and implement a different method for this purpose, when you expect that sort of content - and call it where su...
2023 Jan 15
1
logging strategy
...yslog, and if syslog one gets the program name. So upsdebugx should therefore 1) not have the driver name and 2) should have a function, for things that aren't clearly locatable. Correct? 4) I want to print mostly-ASCII strings with non-ASCII escaped. Is there a routine to convert strings? s_upsdebug_ascii output is difficult for mostly-ascii. There is a log of a read string "\nOK" that is messy (and there's a real bug lurking that this exposes). I think I want (actually I want octal because I was raised PDP-11, but not trying to rock that boat): ABCD\{LF}EFG\[89]\\ or similar for...