Elektron Logging library (#16)

switch to logrus for logging.

replaced old logging library with a wrapper around logrus.
We now just need to use the exported Log(...) and Logf(...) from the logging/
package that wraps around a set of loggers constituting a chain (following COR).
Loggers are configured using a YAML file that specifies the following.
1. enabled/disabled
2. whether the message should be logged on console.
3. filename extension.
4. minimum log level.

Retrofitted source code to now use the updated logging library.
Updated the documentation with information regarding the specification
of the log config file.

Currently, the log format in the config file is not adhered to. This is going to be
addressed in a future commit.
This commit is contained in:
Bhargavi Hanumant Alandikar 2019-12-09 20:15:33 -05:00 committed by PRADYUMNA KAUSHIK
parent 9977251c14
commit 3543960689
61 changed files with 1510 additions and 1067 deletions

29
go.mod
View file

@ -4,20 +4,23 @@ go 1.12
require (
github.com/fatih/color v1.7.0
github.com/gogo/protobuf v1.1.1
github.com/gogo/protobuf v1.3.0
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b
github.com/golang/protobuf v1.2.0
github.com/golang/protobuf v1.3.2
github.com/google/uuid v1.0.0
github.com/mash/gokmeans v0.0.0-20140614041449-8bbf08905a7e
github.com/mattn/go-colorable v0.0.9
github.com/mattn/go-isatty v0.0.4
github.com/mesos/mesos-go v0.0.8
github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe
github.com/pborman/uuid v0.0.0-20180906182336-adf5a7427709
github.com/pkg/errors v0.8.0
github.com/samuel/go-zookeeper v0.0.0-20180130194729-c4fab1ac1bec
github.com/mash/gokmeans v0.0.0-20170215130432-ea22cff45f59
github.com/mattn/go-colorable v0.1.2
github.com/mattn/go-isatty v0.0.9
github.com/mesos/mesos-go v0.0.10
github.com/montanaflynn/stats v0.5.0
github.com/pborman/uuid v1.2.0
github.com/pkg/errors v0.8.1
github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da
github.com/sirupsen/logrus v1.4.2
github.com/stretchr/testify v1.4.0
golang.org/x/crypto v0.0.0-20180927165925-5295e8364332
golang.org/x/net v0.0.0-20180926154720-4dfa2610cdf3
golang.org/x/sys v0.0.0-20180928133829-e4b3c5e90611
gitlab.com/spdf/elektron v0.0.0-20191024200717-26f96f361f10
golang.org/x/crypto v0.0.0-20190927123631-a832865fa7ad
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3
golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a
gopkg.in/yaml.v2 v2.2.2
)