-
Notifications
You must be signed in to change notification settings - Fork 352
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: stream function and build logs (#6139)
* feat: streaming of deploy and function logs * chore: fixes * chore: more fixes * chore: silly * chore: use netlify api client method * feat: stop stream of build logs on finish * chore: command docs * chore: light tests * fix: remove mock require * feat: types * feat: moar types * chore: make argument optional * chore: feedbacks * chore: borked alias * chore: feedback, docs, things * chore: update snapshots * chore: ts thing * feat: sort order for commands * chore: tests for alphabet order * chore: types tidy * chore: feedback * chore: build thing --------- Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
- Loading branch information
1 parent
2428b9c
commit f1b4f05
Showing
14 changed files
with
601 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
--- | ||
title: Netlify CLI logs command | ||
--- | ||
|
||
# `logs` | ||
|
||
<!-- AUTO-GENERATED-CONTENT:START (GENERATE_COMMANDS_DOCS) --> | ||
Stream logs from your site | ||
|
||
**Usage** | ||
|
||
```bash | ||
netlify logs | ||
``` | ||
|
||
**Flags** | ||
|
||
- `filter` (*string*) - For monorepos, specify the name of the application to run the command in | ||
- `debug` (*boolean*) - Print debugging information | ||
|
||
| Subcommand | description | | ||
|:--------------------------- |:-----| | ||
| [`logs:deploy`](/commands/logs#logsdeploy) | (Beta) Stream the logs of deploys currently being built to the console | | ||
| [`logs:function`](/commands/logs#logsfunction) | (Beta) Stream netlify function logs to the console | | ||
|
||
|
||
**Examples** | ||
|
||
```bash | ||
netlify logs:deploy | ||
netlify logs:function | ||
netlify logs:function my-function | ||
``` | ||
|
||
--- | ||
## `logs:deploy` | ||
|
||
(Beta) Stream the logs of deploys currently being built to the console | ||
|
||
**Usage** | ||
|
||
```bash | ||
netlify logs:deploy | ||
``` | ||
|
||
**Flags** | ||
|
||
- `filter` (*string*) - For monorepos, specify the name of the application to run the command in | ||
- `debug` (*boolean*) - Print debugging information | ||
|
||
--- | ||
## `logs:function` | ||
|
||
(Beta) Stream netlify function logs to the console | ||
|
||
**Usage** | ||
|
||
```bash | ||
netlify logs:function | ||
``` | ||
|
||
**Arguments** | ||
|
||
- functionName - Name of the function to stream logs for | ||
|
||
**Flags** | ||
|
||
- `filter` (*string*) - For monorepos, specify the name of the application to run the command in | ||
- `debug` (*boolean*) - Print debugging information | ||
|
||
**Examples** | ||
|
||
```bash | ||
netlify logs:function my-function | ||
netlify logs:function | ||
``` | ||
|
||
--- | ||
|
||
<!-- AUTO-GENERATED-CONTENT:END --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,6 +52,7 @@ const navOrder = [ | |
'lm', | ||
'login', | ||
'logout', | ||
'logs', | ||
'open', | ||
'recipes', | ||
'serve', | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
f1b4f05
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📊 Benchmark results
f1b4f05
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📊 Benchmark results