Skip to content

Django and LogDNA, server seems to be getting stuck #55

@Montana

Description

@Montana

Hey LogDNA,

It could be my configuration but when trying to use LogDNA and Django, the server seems to get stuck. Here's some cursory information:

import logging
from logdna import LogDNAHandler

    LOGGING = {
        'version': 1,
        'disable_existing_loggers': False,
        'formatters': {
            'verbose': {
                'format': "[%(asctime)s] %(levelname)s [%(name)s:%(lineno)s]" +
                        "%(message)s",
                'datefmt': "%d/%b/%Y %H:%M:%S"
            },
            'color': {
                '()': 'colorlog.ColoredFormatter',
                'format': '%(log_color)s%(asctime)s %(levelname)-8s %(name)s %(module)s  %(pathname)s:%(lineno)s%(reset)s \n\r\t %(message)s',
                'datefmt': "%d/%b/%Y %H:%M:%S",
                'log_colors': {
                    'DEBUG': 'cyan',
                    'INFO': 'green',
                    'WARNING': 'yellow',
                    'ERROR': 'red',
                    'CRITICAL': 'red,bg_white',
                }
            }
        },
        'filters': {
            'require_debug_true': {
                '()': 'django.utils.log.RequireDebugTrue',
            },
        },


        'handlers': {
            'console': {
                'level': 'DEBUG',
                'filters': ['require_debug_true'],
                'class': 'logging.StreamHandler',
                'formatter': 'color'
            },
            'logdna': {
                'level': logging.DEBUG,
                'class': 'logdna.LogDNAHandler',
                'key': "my_secret_key",
                'options': {
                    # 'app': '<app name>',
                    # 'env': "alpha",
                    'index_meta': True,
                },
            },
        },


        'loggers': {
            '': {
                'level': logging.DEBUG,
                'handlers': ['logdna'],
                'propagate': True,
            },
        }
    }

I am using the above example for Django logging using LogDNA. But when I'm running a Django server, it's getting stuck. For reference I'm using this as a guide.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions