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.
genetic-orange•4w ago
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.stormy-goldOP•4w 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
correct-apricot•4w ago
@je no need for the apify package: