canonical / canonical/craft-cli

logging handler is not using any formater

Open
#135 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
16
Forks
27
Avg merge
2d 1h
Merged PRs (30d)
12

Description

Currently [`_Handler.emit`](https://github.com/canonical/craft-cli/blob/5e01d366976509d70869e52d9266d4af191e8a8a/craft_cli/messages.py#L328) function is not using `self.formatter` to format message, so instead of `msg = self.format(record)` only `msg = record.getMessage()` is used.

I think that by default [`_Handler`](https://github.com/canonical/craft-cli/blob/5e01d366976509d70869e52d9266d4af191e8a8a/craft_cli/messages.py#L316) could use formatter with simple `%(message)s`, but it could be useful to add custom format here.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.