Comments (3)
Hmm...
So loggers can be used as immutable, are Sync+Send
, so I believe they could be put into a global, and have a closure that prints some values from thread-local variables.
One could also store them in thread-local itself, pass to a spawned thread and save there, I believe.
I haven't really though about it yet and I'm open for feedback and ideas.
from slog.
I have published examples of thread-local handling. (with some comments in the header). I'm still open for discussion on improvements.
from slog.
Closing for now. No immediate action that I see.
from slog.
Related Issues (20)
- Compatibility hazard with Key HOT 6
- travis-ci.org has shutdown HOT 6
- Consider opening Github Discussions HOT 2
- No trace logs being output using slog_envlogger drain HOT 3
- slog-term changelog missing 2.8.1? HOT 1
- Possible to add another drain to an existing root logger? HOT 1
- slog-json: Reconsider `now_local` for default `ts` field? HOT 1
- bug report: slog-stdlog depends log::__private_api_log and slog-stdlog break with log v0.4.15 HOT 6
- Is there a way to not pass Logger to every function HOT 1
- Feature Request: thread_id HOT 1
- Macro formatting HOT 5
- Panic on logger trace level if feature disabled HOT 2
- Print each actix web reqest info HOT 1
- Replace `atty` dependency in `slog-term` due to RUSTSEC-2021-0145 HOT 5
- puzzling apparent conflict between slog, env_logger HOT 3
- slog-json only outputs level in short form HOT 2
- Serde struct not available HOT 1
- Add support for `dyn Error` references HOT 1
- Allow setting custom process name for slog-syslog crate
- `Logger::root_typed` requires doc_hidden elements to be passed around HOT 1
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 slog.