Repository navigation
fix(OSQUERY-004): CU-86aknprfh 2 review findings across 2 files #110
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -33,7 +33,7 @@ bool validateLoggerMode(const char* flagname, const std::string& value) { | |
| // Account for leading 0, special bit, and normal permissions | ||
| if (value.size() > 5) { | ||
| osquery::systemLog(kLoggerModeInvalidValueError); | ||
| std::cerr << kLoggerModeInvalidValueError << std::endl; | ||
| LOG(ERROR) << kLoggerModeInvalidValueError; | ||
|
|
||
| return false; | ||
| } | ||
|
Comment on lines
33
to
39
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 𦩠π std::cerr used for diagnostics instead of LOG()/VLOG() macros In π€ Prompt for AI agentsfix confidence: π‘ 75 medium β react π/π to teach the reviewer |
||
|
|
@@ -42,7 +42,7 @@ bool validateLoggerMode(const char* flagname, const std::string& value) { | |
|
|
||
| if (logger_mode_octal_exp.isError()) { | ||
| osquery::systemLog(kLoggerModeConversionFailureError); | ||
| std::cerr << kLoggerModeConversionFailureError << std::endl; | ||
| LOG(ERROR) << kLoggerModeConversionFailureError; | ||
|
|
||
| return false; | ||
| } | ||
|
|
@@ -51,7 +51,7 @@ bool validateLoggerMode(const char* flagname, const std::string& value) { | |
|
|
||
| if (logger_mode_octal <= 0 || logger_mode_octal > 07777) { | ||
| osquery::systemLog(kLoggerModeInvalidValueError); | ||
| std::cerr << kLoggerModeInvalidValueError << std::endl; | ||
| LOG(ERROR) << kLoggerModeInvalidValueError; | ||
| return false; | ||
| } | ||
|
|
||
|
|
@@ -320,3 +320,4 @@ void FilesystemLoggerPlugin::init(const std::string& name, | |
| FLAGS_stderrthreshold = stderr_threshold; | ||
| } | ||
| } // namespace osquery | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
𦩠π wmi.cpp PrintType uses std::cerr/std::cout/std::wcout for diagnostics instead of LOG()/VLOG()
In
WmiResultItem::PrintType(osquery/core/windows/wmi.cpp), replaced the directstd::cerr/std::cout/std::wcoutdiagnostic writes withLOG(ERROR)for the failure path andVLOG(1)for the success/value-printing path, using the existingosquery/logger/logger.hinclude already present in this file. Thestd::wcoutcall for BSTR values was converted via the already-includedwstringToStringhelper (fromosquery/utils/conversions/windows/strings.h, already used elsewhere in this file) so the value can be streamed intoVLOG(1)as astd::stringrather than requiring wide-stream output. No new includes or external modules were introduced.π€ Prompt for AI agents
fix confidence: π’ 90 high β react π/π to teach the reviewer