logging: split FileHandlerFactory into two classes
Summary: Split FileHandlerFactory into separate FileHandlerFactory and StreamHandlerFactory classes, where FileHandlerFactory only handles logging to files by path name, and StreamHandlerFactory only supports logging to stdout or stderr. The primary motivation for this is to allow logging to stdout or stderr in some cases without allowing arbitrary files to be opened by FileHandlerFactory. This can be achieved now by registering StreamHandlerFactory but not FileHandlerFactory. This makes it safer to allow controlling logging configuration via command line flags even in setuid binaries. Reviewed By: yfeldblum Differential Revision: D6494226 fbshipit-source-id: a3ec371ca4266424d07dff20be18e6e13c057593
Showing
This diff is collapsed.
Please register or sign in to comment