python-lambda-local
python-lambda-local copied to clipboard
Add a verbose option
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