apex / apex/up

Logs missing contextual information

未关闭
#799 3 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Go
星标
8.8k
派生
383
PR 合并指标
30 天内没有已合并 PR

描述

## Prerequisites

* [x] I am running the latest version. (`up upgrade`)
* [x] I searched to see if the issue already exists.
* [x] I inspected the verbose debug output with the `-v, --verbose` flag.
* [ ] Are you an Up Pro subscriber?

## Description

Logs do not contain contextual information unless wrapped in a `fields` object.

## Steps to Reproduce

Log something like this:

```
console.log(JSON.stringify({ message: "Hello", foo: "bar" }))
```

Then do `up logs` after deploying.

I would expect to see a log similiar to:

```
{ "message": "Hello", "foo": "bar" }
```

However, what is being logged is:

```
{ "message": "Hello" }
```

If `foo: "bar"` is wrapped in a `fields` object, the additional entire log is outputted:

```
console.log(JSON.stringify({ message: "Hello", fields{ foo: "bar" } }))
```

This is not documented at https://apex.sh/docs/up/.

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。