Is there a way to export logs without the Rich mar...
# questions
n
Is there a way to export logs without the Rich mark up syntax? Rich works perfectly fine at the terminal, the problem is I don't need them when I am not using a terminal (i.e. export to a different application, log store etc) GH: https://github.com/kedro-org/kedro/issues/4487
h
Someone will reply to you shortly. In the meantime, this might help:
n
At the moment the
markup
flag is set per
DataCatalog
rather than logHandler level, so I can only have all or none of my logHandlers use the markup logs.
e
@Laura Couto, any thoughts on this?
l
Let me take a look
n
I tried these methods but it doesn't work: • Add my own loghandler instead of using Kedro's one It still does not work because the log message come with the mark up. Once it is embedded in the message, the only way to remove it is to use
regex
, which is not reliable when the log message may contains bracket or so. I wonder if it is possible to remove the
markup
at the log message level. So the mark up is only added by the
Kedro.RichHandler
l
Would have to do some exploration on that and see if we can move the calls to
_format_rich
somewhere else. For now, I think the quick solution is not using the Rich handler at all, even on the terminal
n
this is something I do not want to do since I don't control the project run but rather collect information during runs. But I understand this seems to be only workaround for now
^if it's possible to move it out of the catalog, would such change be accepted?
l
If it maintains the functionality I don't personally see why not.
n
I think I find a solution that solve all the problems. Cc @Juan Luis https://github.com/kedro-org/kedro/pull/4496
ā¤ļø 1
šŸ‘€ 1
^ I haven't fixed the test yet but would like to get some opinion on the approach first
I fixed the test now so it's ready for review.
šŸ’ŖšŸ¼ 1