Page MenuHomeSoftware Heritage

docker/env/workers: Set default log level to DEBUG
ClosedPublic

Authored by anlambert on Mar 23 2022, 4:57 PM.

Details

Summary

Docker environment is mainly used for development so better setting
default celery workers log level to DEBUG as they are really useful
when working on loaders and listers.

Diff Detail

Repository
rDENV Development environment
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

as they are really useful when working on loaders and listers.

But they are noise when working on other components.

How much logging does this add?

as they are really useful when working on loaders and listers.

But they are noise when working on other components.

How much logging does this add?

yes, i concur with val, it's noisy iirc.

Maybe you can use your docker-compose.override.yml for that instead.

I've something like this in mine:

swh-lister:
  # environment:
  #   LOGLEVEL: DEBUG

as they are really useful when working on loaders and listers.

But they are noise when working on other components.

How much logging does this add?

Not so much and most log levels are set to DEBUG in other services so that diff:

(swh) ✘-1 ~/swh/swh-environment/docker [master ↑·1|⚑ 66] 
17:06 $ grep -ri debug *
conf/web-search.yml:debug: yes
conf/nginx.conf:# Show startup logs on stderr; switch to debug to print, well, debug logs when
conf/nginx.conf:# running nginx-debug
conf/web-read-replica.yml:debug: yes
conf/web.yml:debug: yes
conf/web-keycloak.yml:debug: yes
conf/web-mirror.yml:debug: yes
env/workers.env:LOGLEVEL=DEBUG
env/kafka.env:LOG4J_LOGGER_KAFKA_AUTHORIZER_LOGGER=DEBUG, authorizerAppender
services/swh-storage-read-replica/entrypoint.sh:           --log-level DEBUG \
services/swh-counters/entrypoint.sh:           --log-level DEBUG \
services/swh-search-journal-client/entrypoint.sh:          swh --log-level DEBUG search --config-file /etc/softwareheritage/search/journal_client.yml journal-client objects
services/swh-scheduler/entrypoint.sh:         --log-level DEBUG \
services/swh-objstorage/entrypoint.sh:       --log-level DEBUG \
services/swh-scheduler-journal-client/entrypoint.sh:          swh --log-level DEBUG scheduler --config-file /etc/softwareheritage/scheduler/journal_client.yml journal-client
services/swh-graph/entrypoint.sh:           --log-level DEBUG \
services/swh-indexer-journal-client/entrypoint.sh:        swh --log-level DEBUG indexer --config-file /etc/softwareheritage/indexer/journal_client.yml journal-client
services/swh-deposit/entrypoint.sh:                  --log-level DEBUG \
services/swh-indexer-storage/entrypoint.sh:         --log-level DEBUG \
services/swh-search/entrypoint.sh:           --log-level DEBUG \
services/swh-counters-journal-client/entrypoint.sh:          swh --log-level DEBUG counters --config-file /etc/softwareheritage/counters/journal_client.yml journal-client

All these are debug logs for SWH apps themselves; and so far they have not been an inconvenience; unlike Celery logs (that's why I wrote D5594)

Most logs should be set to INFO by default, then individually turned to DEBUG when needed.

All these are debug logs for SWH apps themselves; and so far they have not been an inconvenience; unlike Celery logs (that's why I wrote D5594)

Most logs should be set to INFO by default, then individually turned to DEBUG when needed.

I would prefer to have debug logs by default in a development environment. It seems the major
inconvenience here are the celery heartbeat logs, let me check if we can disable them.

indeed, that would be fine with me if you can do that

indeed, that would be fine with me if you can do that

in that case, ok with me too, thanks in advance.

indeed, that would be fine with me if you can do that

I found a way to disable broker hearbeats in celery configuration D7421.
Annoying log messages are no longer displayed.

This revision is now accepted and ready to land.Mar 24 2022, 3:14 PM