Skip to content
This repository has been archived by the owner on Oct 30, 2022. It is now read-only.

Shorten log format #126

Merged
merged 3 commits into from
Mar 16, 2020
Merged

Shorten log format #126

merged 3 commits into from
Mar 16, 2020

Conversation

fornwall
Copy link
Contributor

  • What do you think about this change?
  • Should we use a different log format for when running as a daemon?

Before

$ meeshkan record
2020-03-11 15:16:25,205 - meeshkan.serve.admin.runner - INFO - Starting admin endpont on http://localhost:8888/admin
2020-03-11 15:16:25,205 - meeshkan.serve.record.proxy - INFO - Starting Meeshkan record on http://localhost:8000
2020-03-11 15:16:25,205 - meeshkan.serve.record.proxy - INFO - Spec generation mode is disabled

After:

$ meeshkan record
Starting admin endpoint on http://localhost:8888/admin
Starting Meeshkan record on http://localhost:8000
Spec generation mode is disabled

Future improvements could be adding color and/or emojis to make the output come alive a bit.

@ksaaskil
Copy link
Contributor

Yes it's a very good idea to simplify console logs! Maybe I would still like to have a bit more information in the file system logs going to ~/.meeshkan/logs, maybe we could add a separate formatter for separate handlers?

@aby2s aby2s mentioned this pull request Mar 11, 2020
@fornwall
Copy link
Contributor Author

@ksaaskil I've updated to have the existing log format when logging to files, and the shortened format when logging to the terminal.

So this is shown in the terminal:

Mock is listening on http://localhost:8000

And this is logged to the files:

2020-03-16 10:44:23,875 - meeshkan.serve.mock.server - INFO - Mock is listening on http://localhost:8000

As a follow up in upcoming PRs we'll investigate adding coloured logging in the terminal and perhaps some emojis for statuses to make it come more alive and be more distinctive.

Copy link
Contributor

@ksaaskil ksaaskil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@ksaaskil ksaaskil merged commit 72224a7 into master Mar 16, 2020
@ksaaskil ksaaskil deleted the shorten-log-format branch March 16, 2020 11:45
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants