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

Feature improvements for upslog #2756

Merged
merged 23 commits into from
Jan 8, 2025
Merged

Conversation

jimklimov
Copy link
Member

@jimklimov jimklimov commented Jan 6, 2025

Per NEWS:

  • If you use the legacy CLI options for single-system logging (-s <system> and -l <logfile>) along with newer tuple(s) for multiple-system logging (repeatable -m <system,logfile>), previously the single-system options were overridden by the tuple(s); now they become part of the list.
  • The upsname in the system=upsname[@hostname[:port]] parameter may be an asterisk * to query for devices currently served by the hostname.
  • Same log file may safely be used in different logging tuples (it is then recommended to use %UPSHOST% in a custom formatting string).
  • Fixed printing of %UPSHOST% when multiple systems are being logged.
  • A %t for a TAB character can now be used in the formatting string.
  • Added -D for debugging (and foregrounding by default), like with other NUT daemons.

Also addresses warnings of new clang-19 because GH builders began using it.

UPDATE: See also #2762 for some more improvements, internal and externally usable.

…tuple logging specs together

Signed-off-by: Jim Klimov <[email protected]>
…aracter can now be used in the formatting string

Signed-off-by: Jim Klimov <[email protected]>
…%UPSHOST%` when multiple systems are being logged

Signed-off-by: Jim Klimov <[email protected]>
@jimklimov jimklimov added this to the 2.8.3 milestone Jan 6, 2025
…ow safely be used in different logging tuples

Signed-off-by: Jim Klimov <[email protected]>
…gging (and foregrounding by default), like with other NUT daemons

Signed-off-by: Jim Klimov <[email protected]>
@AppVeyorBot
Copy link

@AppVeyorBot
Copy link

@jimklimov
Copy link
Member Author

jimklimov commented Jan 7, 2025

CI faults unrelated to the changes: CodeQL workers apparently got a clang update and a new wad of warnings to older code base.

@jimklimov jimklimov added the refactor/fightwarn PR or issue proposal to improve code maintainability without functional changes, or to fix warnings label Jan 7, 2025
…#823]

New checks in clang-18/19 brought new findings, some of them reasonable :)

* "%x" style formatting requires an (unsigned int) variable
* numeric literals and macros are (int) by default
* results of math with (uint16_t), done in some cases, are upscaled into
  (int) by default
* char, unsigned or not, seems to be also upscaled into (int)

Overall, had to change formatting strings in some cases, variable types
in others (e.g. flags or notification types do not make sense as signed)
and added casting in a few places that remained.

Signed-off-by: Jim Klimov <[email protected]>
…PRECATED_DECLARATIONS detection

Signed-off-by: Jim Klimov <[email protected]>
…CONVERT_GITHUB_LINKS that were not re-used into a single block of code

Helps against
	docs/Makefile.am: warning: escaping \# comment markers is not portable

Fix inspired by ddclient/ddclient#745

Signed-off-by: Jim Klimov <[email protected]>
@jimklimov jimklimov merged commit b372400 into networkupstools:master Jan 8, 2025
30 checks passed
@jimklimov jimklimov deleted the issue-1803 branch January 8, 2025 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement 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.

2 participants