← Back to issue list

logging handler is not using any formater

View original Github issue

Metadata

Project
craft-cli
Number
#135
Type
issue
State
open
Author
rgildein
Labels
Created
2023-01-27 10:13:32+00:00
Updated
2023-01-27 10:13:41+00:00
Closed

Current evaluation

No evaluation has been recorded for this issue yet.

Issue body

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.

Evaluation history

No evaluation history available.