Skip to content

Commit 13ae428

Browse files
committed
Format CLI log output as JSON
1 parent a142826 commit 13ae428

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

devchat/_cli.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,5 +172,7 @@ def log(skip, max_count):
172172

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

175+
logs = []
175176
for record in recent_prompts:
176-
click.echo(json.dumps(record.shortlog(), indent=2))
177+
logs.append(record.shortlog())
178+
click.echo(json.dumps(logs, indent=2))

0 commit comments

Comments
 (0)