Comments (3)
@ilmanzo do you have any suggestions on this?
Do you think is possible to take advantage of other libs or the fact that we don't know the struct of the generic object to be logged prevents us from using a reflectionless library?
from noodlog.
I'd suggest first to run profile ( https://blog.golang.org/pprof ) with a sample program that logs many different data structures at different loglevels, to identify the bottlenecks. When I'll find some spare time, I can prepare some benchmarks.
Also take a look at the approach from https://github.com/rs/zerolog (logger developed by Netflix Director of Engineering), because allocation impacts memory footprint and performance (due to pressure on Garbage Collector)
Maybe the user could "tag" the struct fields to decide when to log a field or not, in order to save time and avoid sensitive data leak ?
from noodlog.
@ilmanzo What is meant by "avoiding allocation"? Do they avoid creating instances of structs in memory? The idea of the tag is very good but only if you know the struct you're going to log. I wanted to cover also the case I make an HTTP request, I get the response and without unmarshalling, I log the response directly, obscurating sensitive data if any. I thought if this is a heavy operation, I could extract the obscuration method outside, so it could be used only if it is explicit. Many thanks for all your precious suggestions.
from noodlog.
Related Issues (18)
- Extend sensitive data obfuscation
- Add the possibility to print log in files HOT 2
- Add config to redirect error logs to stderr
- Create Benchmark HOT 2
- Add the Code Coverage
- Enable Datetime format customization HOT 3
- Color enhancements
- Add badges to readme
- Increase Code Coverage for Colors HOT 1
- Test TestSimpleLogger is flaky HOT 1
- Refactor logger as struct HOT 1
- Include examples of "out of the box" logs format in the README
- Logs don't go new line HOT 6
- Add the possibility to define a custom RGB color
- extract ObscureSensitiveParams function
- Add automatic changelog to the project
- Add GitHub templates
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 noodlog.