Comments (1)
data, extra
- Used to logging some complex data
examples:
slog.Warn("warning log message")
slog.WithData(slog.M{
"key0": 134,
"key1": "abc",
}).Infof("info log %s", "message")
output:
[WARNING] warning log message
[INFO] info log message {key0:134, key1:abc}
from slog.
Related Issues (20)
- slog performance HOT 6
- 如何设置创建的 log 文件的权限?默认是 0644,如何改为 0600 或 0700? HOT 5
- 如何获取原始参数 HOT 6
- record中的Time time.Time HOT 8
- 能在 golang 1.10 版本下使用吗 HOT 1
- Setting channel name cross multiple loggers HOT 3
- Level handling is non-obvious HOT 3
- Extra newline added by default even if no newline set at Template String HOT 3
- How to compress the (old) log file after rotation? HOT 6
- 日志写入文件问题 HOT 2
- 建议在文档里注明 Buffer Size, Max Size 等数字参数的单位 HOT 2
- 如何禁用console日志输出? HOT 4
- 请问日志的时间格式怎么添加毫秒输出 HOT 2
- 日志格式设置对写入文件的日志无效 HOT 2
- 你好作者 请问如何设置最低日志级别? HOT 2
- 设置了模板,打印没问题,文件里无效 HOT 4
- 旋转器在天数变幻时会先输出再创建新的文件 HOT 7
- 被maxSize切割过的文件无法被RotateTime的压缩 HOT 2
- 如何配置日志清理 HOT 9
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.