Skip to content

Add functions:log command #57

@bcomnes

Description

@bcomnes

netlify functions:log create-todo => pulls down the function logs that the UI displays

Use case:

As I'm pinging my live functions, it would be awesome to stream in the logs locally to a terminal window.

Questions:

  • Should logs tail by default or should user supply -t flag?

Potential way for handling multiple deploy previews:

# netlify functions:logs create
# streams in all logs from all live preview urls + master
# [context] functionName: log output
[branch-xyz] create: (log blah blah blah)
[branch-xyz] create: (log yaddy yaddy yadda)
[branch-my-other-feature] create: (log blah blah blah)
[master] create: (log blah blah blah)
[master] create: (log blah blah blah)

If I want a specific preview url I could supply as a flag

# netlify functions:logs create -c master
# -c for context, only show master logs
[master] create: (log yaddy yaddy yadda)
[master] create: (log blah blah blah)
[master] create: (log lol lol lol)

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: featurecode contributing to the implementation of a feature and/or user facing functionality

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions