Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • concrexit concrexit
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 70
    • Issues 70
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 10
    • Merge requests 10
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • thaliathalia
  • concrexitconcrexit
  • Issues
  • #956
Closed
Open
Issue created Nov 03, 2019 by Jelle Besseling@jbesselingMaintainer

No loggers defined for any of our apps

One-sentence description

Anything that is logged by concrexit isn't saved anywhere, only exceptions seem to be logged, this could be due to sentry.

Current behaviour / Reproducing the bug

import logging

logger = logging.getLogger(__name__)
logger.error("Module loaded")

I tried this in an urls.py because it's always loaded, and with production settings this message is not logged. This is because LOGGING in settings/production.py doesn't define a logger for e.g. education.urls.

This can be resolved by adding a root logger like so:

'loggers': {
   'django': {
       'handlers': ['console', 'logfile'],
        'level': 'INFO',
    },
    '': {
       'handlers': ['console', 'logfile'],
       'level': 'INFO',
    }
},

This makes it so all messages that propagate to the root logger and have at least log level INFO get logged to console and logfile.

Expected behaviour

Useful log messages are logged by concrexit.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking