From 6c05c42c445ea1e8cf6bcb949a21042feaff97da Mon Sep 17 00:00:00 2001 From: Shane Neuerburg Date: Fri, 21 Oct 2016 19:31:24 -0600 Subject: [PATCH] Add command line flag to cgr-engine for logging levels This adds a new -log_level flag to cgr-engine, defaulting to 5 (INFO). The logger has been extended to drop log messages that do not meet or exceed the log level requested. --- CONTRIBUTORS.md | 1 + cmd/cgr-engine/cgr-engine.go | 2 + sessionmanager/fssessionmanager.go | 5 +- sessionmanager/kamailiosm.go | 3 +- utils/logger.go | 124 ++++++++++++++++++++++++++--- 5 files changed, 118 insertions(+), 17 deletions(-) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 07cec5b9b..2b41cf331 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -50,6 +50,7 @@ information, please see the [`CONTRIBUTING.md`](CONTRIBUTING.md) file. | @andmar | André Maricato | | @brendangilmore | Brendan Gilmore | | @afone-lboue | Ludovic Boué | +| @shaneneuerburg | Shane Neuerburg |