Comments (3)
It will more scalability, you could create new logger by logrus.New()
, then use config to hijack it, then the new logger's config will be set, and the logger also could be hijack more than once, if your env changed, you just hijack again, then the config will take effect.
the hijack mode also could hijack logrus.StandardLogger(), then we could use logurs.XXXX for print errors, if we want change the logger's config, just hijack logrus.StandardLogger() again.
from logrus_mate.
Ok. But can we use another string format for configure logger? (For example: TOML)
In previous versions for configuring we use struct. This struct could be filled by reflection.
Now I can't see ways to do it.
from logrus_mate.
my latest commit are support customize config provider.
from logrus_mate.
Related Issues (18)
- License v1 and v2 HOT 3
- 请问graylog的conf应该如何设置?能否举个例子? HOT 5
- 那个example跑不通啊 HOT 1
- 配置了文件存储日志,但是发现控制台同时也输出了日志 HOT 2
- 按日切割功能有缺陷 HOT 6
- Is logrus_mate support watching and re-reading config files? HOT 1
- About sirupsen and Sirupsen, different from release and master HOT 1
- 写文件log,按天记录 HOT 6
- 按日切割和按大小切割同时打开的时候,历史Log日期错误 HOT 2
- file hook level定义不统一
- Bump version for Go 1.11 module HOT 1
- file hook的例子mate.conf存在问题,级别leve建议按照不同的hook进行配置
- When I pass a name to logger it breaks with nil pointer HOT 1
- how to set config directly rather than string or file HOT 2
- Update Logstash dependency
- 如何按天生成日志文件? HOT 1
- name conflict with Logrus HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from logrus_mate.