Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix upslog legacy code #2762

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

jimklimov
Copy link
Member

Continue work started by @cschuber - and complete the conversion of upslog to primarily use the tuple-oriented structures internally, without shared variables of the older single-UPS logging approach - pass around struct monhost_ups_t * instead as explicit args.

Also update #2756 improvements with a new -N CLI option to prepend %UPSHOST%%t into formatting strings, to ease logging of multiple devices into same target (stdout or file).

…_t to header, rename the latter with "_t"

Signed-off-by: Jim Klimov <[email protected]>
…ethods and avoid shared global vars for single UPS

NOTE: The logbuffer and logformat remain shared, the former is
cleaned before use in run_flist() anyway. Might be passed around,
too, but why keep re-allocating and freeing memory (or tossing more
stack bytes with pointer and size to static variable of that method)?..

Signed-off-by: Jim Klimov <[email protected]>
…x `%UPSHOST%%t` before the format string

Signed-off-by: Jim Klimov <[email protected]>
@jimklimov jimklimov added enhancement feature refactor/fightwarn PR or issue proposal to improve code maintainability without functional changes, or to fix warnings labels Jan 11, 2025
@jimklimov jimklimov added this to the 2.8.3 milestone Jan 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement feature refactor/fightwarn PR or issue proposal to improve code maintainability without functional changes, or to fix warnings
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant