Comments (7)
zap is interesting. https://github.com/uber-go/zap I will take a look on this.
from vmware-go-kcl.
I will write a logrus hook for that.
from vmware-go-kcl.
The only issue is golang log does not provide enough abstraction on common functionalities.
https://golang.org/pkg/log/
We had a very long debate on which logging package to use and finally settled down to logrus. It is quite extensible and our internal codebase uses customized log library with compatible interface as logrus.
https://medium.com/@_orcaman/most-imported-golang-packages-some-insights-fb12915a07
from vmware-go-kcl.
The major advantage of using logrus is that it provides structured logger for Go. The logging result can be easily ingested into ElasticSearch for log analysis.
https://github.com/sirupsen/logrus
from vmware-go-kcl.
Yeah I agree that the golang log is not good enough. We happen to use zap (which is also a structured logger). The problem is mainly that it is a bit painful (but doable with hooks) to redirect logs from logrus to zap. What I have seen libraries doing (like AWS SDK) is to create a custom logging interface (with a default if needed) that the users can then implement with their logger of choice.
from vmware-go-kcl.
I finally wrote the hook https://github.com/Sytten/logrus-zap-hook, though I think an interface would be better ;)
from vmware-go-kcl.
PR: #43
for adding support on both logrus and zap logger.
from vmware-go-kcl.
Related Issues (20)
- Lease stealing code exception HOT 3
- Option to assume role in AWS Kinesis client HOT 1
- Checkpointer interface breaking change in v1.3.0 HOT 1
- worker.go:339 Error in getRecords: unexpected EOF
- How to get the StreamName/ConsumerName inside ProcessRecords method HOT 1
- Unsupported protocol scheme
- Workload skewed across workers HOT 3
- (Still) Too many calls to DescribeStream HOT 3
- Error in getRecords leaves a dangling record processor. HOT 1
- Stuck in waitOnParentShard after resharding HOT 4
- Possible Data Race for input Checkpointer HOT 1
- Semantic versioning friendly version tags HOT 1
- Shard consumer sometimes fails to recover from error refreshing lease HOT 9
- Prometheus metrics should add appname as label and not in the metric name HOT 1
- Possibility to Work w/ DynamoDB Streams HOT 3
- Error in publishing cloudwatch metrics. Error: NoCredentialProviders: no valid providers in chain. HOT 1
- How to use record deaggregator? HOT 2
- Multiple consumers processing records from the same shard. HOT 10
- Tagged toolchain docker container vmware/go-kcl-toolchain:0.1.2 uses golang version 1.12.4
- AWS Go SDK V2 HOT 15
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 vmware-go-kcl.