• Harsh Poddar's avatar
    Add sync_level option to the logging config · 6b1869e2
    Harsh Poddar authored
    Summary:
    GLOG has `-logbuflevel` option that allows a user to specify the level above which none of the logs should be buffered. This is helpful as we can configure it such that `INFO` and all verbose logs are buffered before being output, but all logs above `INFO` should be flushed synchronously. This will ensure that all logs above a certain level are printed before any sort of crash.
    
    This diff allows a user to specify a config `sync_level`. The value for this can be any `LogLevel`. Example config:
    
      .=WARN,akkio.cli=INFO; default:async=true,sync_level=WARN
    
    The default value for GLOG's -logbuflevel is `0` (`INFO`).
    To match GLOG's behavior, this diff sets the following as defaults:
    
      async=true,sync_level=WARN
    
    Reviewed By: simpkins
    
    Differential Revision: D8867555
    
    fbshipit-source-id: 7ec30dfb41b2f3cd3568d70304db7a9fcf668779
    6b1869e2
main.cpp 2.46 KB