Skip to content

Commit

Permalink
Format CLI log output as JSON
Browse files Browse the repository at this point in the history
  • Loading branch information
basicthinker committed May 8, 2023
1 parent a142826 commit 13ae428
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion devchat/_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,5 +172,7 @@ def log(skip, max_count):

recent_prompts = store.select_recent(skip, skip + max_count)

logs = []
for record in recent_prompts:
click.echo(json.dumps(record.shortlog(), indent=2))
logs.append(record.shortlog())
click.echo(json.dumps(logs, indent=2))

0 comments on commit 13ae428

Please sign in to comment.