heirko / go-contrib Goto Github PK
View Code? Open in Web Editor NEWHelper for Log configuration, Mixin for properties with fangs
License: MIT License
Helper for Log configuration, Mixin for properties with fangs
License: MIT License
I tried cloning and creating a branch but i do not have privileges. so could you please add the below function to the library under go-contrib\logrusHelper\config.go
it will help if i have my viper configuration categorized and want to load to loggerconfig.
// UnmarshalConfigurationByKey read configuration from viper by a category key.
// e.g., if you have all your logging properties under a common key logging
// It returns a logrus_mate logger configuration instance.
func UnmarshalConfigurationByKey(key string, viper *viper.Viper) (conf mate.LoggerConfig) {
err := viper.UnmarshalKey(key, &conf)
if err != nil {
log.Fatalf("unable to decode into struct, %v", err)
}
if err = conf.Validate(); err != nil {
panic(err)
}
return
}
I think some packages have changed because there is a dependency problem by getting the package logrusHelper.
$ go get -u github.com/heirko/go-contrib/logrusHelper
# github.com/heirko/go-contrib/logrusHelper
../github.com/heirko/go-contrib/logrusHelper/config.go:13: undefined: logrus_mate.LoggerConfig
../github.com/heirko/go-contrib/logrusHelper/config.go:25: undefined: logrus_mate.LoggerConfig
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.