passive-yellow•8mo ago
Customising logging
Is there a recommended way to customise logging? I want to be able to log which specific crawler and which handler a log is coming from. I have tried to override the logger in the crawler using
but then I get the following type error:
Thanks!
4 Replies
Someone will reply to you shortly. In the meantime, this might help:
-# This post was marked as solved by Matous. View answer.
I think it should work if you get the log from
'apify' instead of '@apify/log'.
This works fine for me. I think there is something broken with the import path. I'll pass this to the engineering team but let me know if this works for you first.passive-yellowOP•8mo ago
@luigi.ruocco This works for me! Had to of course install the apify package separately though which isn't ideal as I only need crawlee/logging but did the trick
@je no need for the apify package: