feat(logger): 添加环境变量到日志数据以增强日志信息
All checks were successful
/ release (push) Successful in 30s

This commit is contained in:
zhaoyingbo 2025-03-18 13:09:32 +00:00
parent ad38cf2a3b
commit f429496edd

View File

@ -71,10 +71,11 @@ class OpenObserveTransport extends Transport {
})
try {
// 添加时间戳字段到日志数据
// 添加时间戳字段和环境变量到日志数据
const logData = {
...info,
_timestamp: new Date().toISOString(),
env: process.env.NODE_ENV || "unknown",
}
// 压缩数据以减少传输大小