apify / apify-ts

Crawlee dev repo
https://crawlee.dev
Apache License 2.0
22 stars 3 forks source link

CRAWLEE_LOG_LEVEL env var not supported #171

Closed AndreyBykov closed 2 years ago

AndreyBykov commented 2 years ago

Describe the bug APIFY_ vs CRAWLEE_ env vars: if I set process.env.CRAWLEE_LOG_LEVEL locally to DEBUG - it would not show debug messages. With log.setLevel(log.LEVELS.DEBUG) it works as expected.

From @B4nan:

I guess that's because this is implemented in the logger directly. I guess we should set the log level when bootstrapping the Configuration class, definitely worth supporting CRAWLEE_LOG_LEVEL.

To Reproduce

process.env.CRAWLEE_LOG_LEVEL = 'DEBUG';
log.debug('Test')

Expected behavior Should log Test debug message to console.

System information:

AndreyBykov commented 2 years ago

Also probably should be added to env vars guide.

B4nan commented 2 years ago

Please update the guides