Skip to content

Commit

Permalink
Removed filehandler for logs
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkCalvert committed May 8, 2024
1 parent 4a218e4 commit 52dbb93
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 14 deletions.
2 changes: 0 additions & 2 deletions ckan/Dockerfile.worker
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ ENV CKAN_WORKER=true
# Override the default CKAN config plugins to only use the ones we need for the worker
ENV CKAN__PLUGINS="dbca activity datastore xloader scheming_datasets qa archiver report doi datatables_view envvars"
RUN ckan config-tool $CKAN_INI "ckan.plugins = ${CKAN__PLUGINS}"
# Update the CKAN config log file handler to use the worker log file
RUN ckan config-tool $CKAN_INI -s handler_fileHandler "args = ('/srv/app/logs/ckan-worker.log', 'midnight', 1, 7)"

## Supervisor config
COPY supervisor/ckan_*.conf /etc/supervisord.d
Expand Down
18 changes: 6 additions & 12 deletions ckan/config/dbca.ini
Original file line number Diff line number Diff line change
Expand Up @@ -130,36 +130,36 @@ ckanext.saml2auth.logout_expected_binding = urn:oasis:names:tc:SAML:2.0:bindings
keys = root, ckan, ckanext, werkzeug, saml2

[handlers]
keys = console, fileHandler
keys = console

[formatters]
keys = generic

[logger_root]
level = WARNING
handlers = console, fileHandler
handlers = console

[logger_werkzeug]
level = WARNING
handlers = console, fileHandler
handlers = console
qualname = werkzeug
propagate = 0

[logger_ckan]
level = INFO
handlers = console, fileHandler
handlers = console
qualname = ckan
propagate = 0

[logger_ckanext]
level = DEBUG
handlers = console, fileHandler
handlers = console
qualname = ckanext
propagate = 0

[logger_saml2]
level = DEBUG
handlers = console, fileHandler
handlers = console
qualname = saml2
propagate = 0

Expand All @@ -169,11 +169,5 @@ args = (sys.stderr,)
level = NOTSET
formatter = generic

[handler_fileHandler]
class = handlers.TimedRotatingFileHandler
args = ('/srv/app/logs/ckan.log', 'midnight', 1, 7)
level = NOTSET
formatter = generic

[formatter_generic]
format = %(asctime)s %(levelname)-5.5s [%(name)s] %(message)s

0 comments on commit 52dbb93

Please sign in to comment.