Comments (5)
You are right—the current behaviour isn't exactly nice. I'm leaning towards printing a warning with logrus in the case where either of those keys exist—and still override it.
Alternatives would be to prefix the builtin ones with _
, but that's messy and I think in most cases people won't override those. The one you'd be most tempted to override feels like Level—but even that is confusing.
What do you think of that?
from logrus.
Because they're always there, I'd make them fields on the Entry struct instead of values in the map.
from logrus.
That makes sense—what happens if they're set in the map though? Ignored? Still printed?
from logrus.
Still printed, they'd be fields like any other.
from logrus.
We discussed this in person and decided to leave it as is for now.
from logrus.
Related Issues (20)
- can't build for wasm (go 1.21 rc) HOT 3
- Data race in hooks.test package HOT 3
- virter vm cp not working HOT 2
- Info requested: How to buffer messages and release at the end HOT 2
- Vulnerability of dependency "gopkg.in/yaml.v3" HOT 2
- Logrus potential DOS - Please open a CVE for issue #1370 to encourage users to patch HOT 3
- Feature: Add slog compatibility layer HOT 5
- logrus+lumberjackrus, After the old log is deleted, the hard drive will not be released, HOT 2
- Vulnerability: gopkg.in/yaml.v3 CVE-2022-28948 HOT 2
- Bazel compilation failling HOT 2
- Question: Any way to view the value of a field from a logrus.FieldLogger? HOT 2
- How to apply colours for a custom log format? HOT 2
- How to safely change Logger.Out on the fly? HOT 2
- How should I position my problem? HOT 2
- Cut a new release with wasip1 support? HOT 4
- github.com/interactive-solutions/go-logrus-elasticsearch cannot find HOT 2
- Bump version of stretchr/testify? HOT 3
- Unclear on documentation regarding Hook interface HOT 3
- Please maintain the CHANGELOG HOT 3
- logger.Out.Write's mutex may be unnecessary, when Out is a file fd 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.