apex / apex/up

Logs missing contextual information

Open
#799 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
8.8k
Forks
383
PR merge metrics
No merged PRs in 30d

Description

## 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/.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.