-
Notifications
You must be signed in to change notification settings - Fork 8.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FAB-2916] Refactor flogging package
There are several things on this package that could use improvement. Off the top of my head as I'm writing this, I am noting down the following: 1. Test coverage is great but the tests are incredibly verbose and filled with redundant checks (as an example: there is no need to ensure that the log level is the default in `TestSetModuleLevel_moduleWithSubmodule`, this is taken care of in a previous test). 2. Asymmetry on the return types; some functions return the logging level as the string type, others as the `logging.Level` type. 3. Functions whose purpose is unclear (`InitFromViper`), whose name is inaccurate (`SetLoggingFormat` does not just set the logging format), or whose logic is simply flawed (`InitFromViper` - pay attention to how the input argument is used). 4. Outdated and --in some cases-- nonsensical comments on the exported functions. This is my attempt to tidy things up. I've also updated the code that used to reference the now-deprecated methods. Change-Id: I0cc020f20b3e4a4c2a4785f98aee2cb3282758bc Signed-off-by: Kostas Christidis <kostas@christidis.io>
- Loading branch information
1 parent
a1dccef
commit dcac07e
Showing
8 changed files
with
252 additions
and
584 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
Oops, something went wrong.