Skip to content

Commit

Permalink
PMM-4154 Add log-levels. (#143)
Browse files Browse the repository at this point in the history
  • Loading branch information
Anton Kucherov authored and AlekSi committed Jun 11, 2019
1 parent b090789 commit 34ac992
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
- Added Authentification Database option when connect to mongo #139, thx [@etiennecoutaud](https://github.com/etiennecoutaud).
- Added helm chart to readme #140, thx [@pgdagenais](https://github.com/pgdagenais).
- [PMM-4154](https://jira.percona.com/browse/PMM-4154): Added standard logging flags.

### Fixed
- Fixed some function comments based on best practices from Effective Go #137, thx [@CodeLingoBot](https://github.com/CodeLingoBot).
Expand Down
1 change: 1 addition & 0 deletions mongodb_exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ var (

func main() {
initVersionInfo()
log.AddFlags(kingpin.CommandLine)
kingpin.Parse()

if *testF {
Expand Down
7 changes: 7 additions & 0 deletions testdata/mongodb_exporter.testFlagHelp.golden
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,11 @@ Flags:
Valid time units are 'ns', 'us' (or 'µs'), 'ms', 's', 'm', 'h'.
--groups.enabled="" Currently ignored
--version Show application version.
--log.level="info" Only log messages with the given severity or
above. Valid levels: [debug, info, warn, error,
fatal]
--log.format="logger:stderr"
Set the log target and format. Example:
"logger:syslog?appname=bob&local=7" or
"logger:stdout?json=true"

0 comments on commit 34ac992

Please sign in to comment.