Skip to content

feat(cli)!: vc logs now returns runtime logs#11788

Merged
feugy merged 18 commits intomainfrom
damien/log-457-runtime-logs-on-vc
Jul 15, 2024
Merged

feat(cli)!: vc logs now returns runtime logs#11788
feugy merged 18 commits intomainfrom
damien/log-457-runtime-logs-on-vc

Conversation

@feugy
Copy link
Member

@feugy feugy commented Jul 3, 2024

🧐 What's in there?

This is the second part of distinguishing build logs from runtime logs.

  • vc logs: read the newly emitted runtime logs

(Pretty print format discussed internally with the logs team and our wonderful designer @timolins)
image

🧪 How to test?

Given you're logged into Vercel organization and have our front application codebase:

  • pnpm -F vercel dev logs --cwd PATH_TO_FRONT/apps/vercel-site https://vercel.com to see up to 5 minutes of newly emitted logs
  • pnpm -F vercel dev logs --cwd PATH_TO_FRONT/apps/vercel-site https://vercel.com --json to see these logs printed in JSON, so they could be piped into jq

Unit tests added:

  • inspect command: pnpm -F vercel exec vitest run /logs.test

@changeset-bot
Copy link

changeset-bot bot commented Jul 3, 2024

🦋 Changeset detected

Latest commit: f1aa1b8

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
vercel Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@feugy feugy force-pushed the damien/log-457-runtime-logs-on-vc branch from 0ff8c2f to 9d15daf Compare July 4, 2024 09:38
@feugy feugy marked this pull request as ready for review July 4, 2024 09:39
@feugy feugy merged commit 78e1150 into main Jul 15, 2024
@feugy feugy deleted the damien/log-457-runtime-logs-on-vc branch July 15, 2024 16:34
EndangeredMassa pushed a commit that referenced this pull request Jul 16, 2024
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## vercel@35.0.0

### Major Changes

- [breaking] `vc logs` now returns runtime logs. Use `vc inspect --logs`
and `vc deploy --logs` to get build logs
([#11788](#11788))

### Patch Changes

- Add download of diagnostics
([#11859](#11859))

- Updated dependencies
\[[`4c892f040`](4c892f0),
[`11e22746a`](11e2274)]:
    -   @vercel/next@4.3.3
    -   @vercel/redwood@2.1.1
    -   @vercel/remix-builder@2.1.11
    -   @vercel/node@3.2.4

## @vercel/next@4.3.3

### Patch Changes

- fix glob path for next.js diagnostics
([#11859](#11859))

- Upgrade to @vercel/nft 0.27.3 with a bug fix for browser mapping
support ([#11841](#11841))

## @vercel/node@3.2.4

### Patch Changes

- Upgrade to @vercel/nft 0.27.3 with a bug fix for browser mapping
support ([#11841](#11841))

## @vercel/redwood@2.1.1

### Patch Changes

- Upgrade to @vercel/nft 0.27.3 with a bug fix for browser mapping
support ([#11841](#11841))

## @vercel/remix-builder@2.1.11

### Patch Changes

- Upgrade to @vercel/nft 0.27.3 with a bug fix for browser mapping
support ([#11841](#11841))

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
ztanner added a commit to vercel/next.js that referenced this pull request Jul 19, 2024
`vercel logs` now retrieves runtime logs in watch mode. This causes the
`createNext` step to hang as it never resolves.

These logs are intended to be build logs, which is available under
`vercel inspect --logs`. I removed some arguments that are no longer
valid for that CLI function.

Separately, it looks like we're able to add runtime logs to
`next.cliOutput`, which I'll do in a future PR.

Related:
- vercel/vercel#11788

[Failure
example](https://github.com/vercel/next.js/actions/runs/10012728881/job/27679225925)

["Success"
example](https://github.com/vercel/next.js/actions/runs/10013211758/job/27680965374?pr=67971)
ztanner added a commit to vercel/next.js that referenced this pull request Sep 3, 2024
`vercel logs` now retrieves runtime logs in watch mode. This causes the
`createNext` step to hang as it never resolves.

These logs are intended to be build logs, which is available under
`vercel inspect --logs`. I removed some arguments that are no longer
valid for that CLI function.

Separately, it looks like we're able to add runtime logs to
`next.cliOutput`, which I'll do in a future PR.

Related:
- vercel/vercel#11788

[Failure
example](https://github.com/vercel/next.js/actions/runs/10012728881/job/27679225925)

["Success"
example](https://github.com/vercel/next.js/actions/runs/10013211758/job/27680965374?pr=67971)
lubieowoce pushed a commit to vercel/next.js that referenced this pull request Sep 4, 2024
`vercel logs` now retrieves runtime logs in watch mode. This causes the
`createNext` step to hang as it never resolves.

These logs are intended to be build logs, which is available under
`vercel inspect --logs`. I removed some arguments that are no longer
valid for that CLI function.

Separately, it looks like we're able to add runtime logs to
`next.cliOutput`, which I'll do in a future PR.

Related:
- vercel/vercel#11788

[Failure
example](https://github.com/vercel/next.js/actions/runs/10012728881/job/27679225925)

["Success"
example](https://github.com/vercel/next.js/actions/runs/10013211758/job/27680965374?pr=67971)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants