Skip to content

Add a verbose option #68

@joelachance

Description

@joelachance

The output is helpful and excellent, but it would be nice to have output that is less verbose. I'm finding I don't need the datetime and requestId, for example.

I propose a -v & --verbose flag that when passed, will continue operating as normal, however, when not passed will have truncated logging. I'd be interested in a --colors option as well to improve readability.

For example, logs when --verbose is passed:

[root - INFO - 2020-04-30 08:19:31,996] Event: {'name': 'python-lambda-local'}
[root - INFO - 2020-04-30 08:19:31,996] START RequestId: 1f1a32e3-fa30-48f6-a490-37b4ca0643fd Version: $LATEST
[root - INFO - 2020-04-30 08:19:32,005] END RequestId: 1f1a32e3-fa30-48f6-a490-37b4ca0643fd
[root - INFO - 2020-04-30 08:19:32,005] REPORT RequestId: 1f1a32e3-fa30-48f6-a490-37b4ca0643fd  Duration: 0.84 ms
[root - INFO - 2020-04-30 08:19:32,005] RESULT:
hello world

When --verbose is not passed:

Event:      {'name': 'python-lambda-local'}
Duration:   0.84 ms
Result:     hello world

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions