-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Consolidate fprintf() calls in ldmsd_log() and ovis_log()
The majority of the code uses ldmsd_log(), but a few ldmsd plugins and the authentication plugins use ovis_log(). This mixed use of logging functions creates a possibility of message interleaving. ovis_log() prints to stdout, and both functions write to the same FILE* stream as ldmsd sets stdout to the log file. Modified both functions to use a single fprintf() call per log message instead of multiple calls. While this doesn't eliminate the possibility of message interleaving between threads, consolidating to a single fprintf() per message reduces the opportunities for interruption compared to multiple fprintf() calls.
- Loading branch information
Showing
2 changed files
with
20 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters