lankesh
09/03/2023, 12:09 PMosqueryi.
How can we capture the osquery status logs. such as INFO, ERROR, WARNING to file. From my investigation, I arrived at a point that osqueryi cannot use flags of logger_plugin to redirect them to file. Also, osquery uses glog by default when no logger_plugin is set. with this, it always redirects the logs to console. How can we control the log messages of osqueryi. I know osqueryi is interactive shell. I tried looking into source code and found below code. Please help me find a way to capture the osqueryi runtime logs. I am ok to modify the source code and rebuild the binary.
`
if (isShell()) {
// Do not set these values before calling ParseCommandLineFlags.
// These values are force-set and ignore the configuration and CLI.
FLAGS_disable_logging = true;
FLAGS_disable_watchdog = true;
}
`lankesh
09/04/2023, 10:34 AMHarlanF
09/04/2023, 10:09 PMlankesh
09/06/2023, 9:02 AMHarlanF
09/08/2023, 4:54 PMlankesh
09/12/2023, 2:05 PM