Skip to main content
Filter by
Sorted by
Tagged with
1 vote
0 answers
96 views

I have added this code to my settings.py, but it's not working (It's not logging errors warnings and ...). Django default logging works perfectly fine, debug is True in my settings and I've created ...
Matin Abedini's user avatar
0 votes
0 answers
45 views

I have a following logging config: "root": { "level": "ERROR", "handlers": ["console", "server_file"], }, "handlers": { ...
Azima's user avatar
  • 4,161
0 votes
0 answers
308 views

I have a following logging config: "root": { "level": "ERROR", "handlers": ["console", "server_file"], }, "handlers": { ...
Azima's user avatar
  • 4,161
0 votes
0 answers
43 views

I have a logger set up to save logs to a file, but I'm encountering an issue with log rotation. Not all logs are being transferred during the rotation process, and the majority of logs are missing. ...
Kirill's user avatar
  • 93
0 votes
1 answer
45 views

Setup and desired behavior: Logging-configuration defined outside of settings.py Want to still have logging with runserver 1. # custom_logging.py def set_logger(logger): # add formatters and ...
Vegard's user avatar
  • 5,247
1 vote
0 answers
62 views

I am trying to make a message/logging system where the user/front-end can get the progress status of the process currently running in a thread they initiated (what they started, where the process is ...
Wafiat's user avatar
  • 11
1 vote
0 answers
42 views

I am trying to configure logger in the Django Framework. I have changed the logging level to DEBUG in both handler and logger and still the INFO log is not getting logged. It only shows log upto ...
Alok Kumar's user avatar
0 votes
1 answer
79 views

I have a created a django logger settings. It is intended that console django.db.backends should not be applied to console. But it is printing in console as well. LOGGING = { "version": ...
Vishnu T's user avatar
2 votes
0 answers
163 views

In my app there's a Project model which users can create, request to join, invite others to join, accept/reject requests/invites to join, leave, etc. I'm using the Django LogEntry to help the ...
Marco Castanho's user avatar
0 votes
1 answer
71 views

When creating a custom User (inherits from AbstractUser) we have a signal which creates a randomized password (from Django's get_random_string) and send it out in an email in a celery task to the user....
kunambi's user avatar
  • 772
1 vote
1 answer
796 views

I want to replace print statements to logger but without change print statement in application. And how can I redirect print statement to log file??? Below is my code. settings.py LOGGING = { &...
Karan Chaudhari's user avatar
2 votes
1 answer
2k views

I have added log messages in my Django application and it was successfully logging log messages to the log file. Now, I tried to add log messages to AWS CloudWatch. When I run the application it ...
rangarajan's user avatar
1 vote
1 answer
447 views

I'm trying to log some info messages specifically in django settings.py. I'm following the first example in the django documentation that shows a simple configuration. The only thing I changed was ...
Frantz Paul's user avatar
0 votes
1 answer
490 views

how i can create new info.log file each time app runs. Let me know the cahnges i need to make in this config. I know we have to use doRollover or rotate but how to implement in this config not getting ...
SAGY's user avatar
  • 67
1 vote
0 answers
200 views

Trying to implement a DB logger in my Django project but I am facing a problem in managing the logs in my DB so how can I automatically delete the old records from DB settings.py INSTALLED_APPS = ['...
Adarsh Srivastav's user avatar
4 votes
0 answers
302 views

I was trying to create a separate log file for every app . But my every log file is capturing all the log data irrespective of which app is running. I tried like below, In my setting.py file i have ...
Sakeer's user avatar
  • 1,998
0 votes
2 answers
196 views

settings Page: "formatters": { "simple": { "format": "%(name)s %(asctime)s %(message)s", "datefmt": "%Y-%m-%dT%H:%...
Sagar Nakade's user avatar
3 votes
1 answer
2k views

To see what middleware Django has to adapt, you can turn on debug logging for the django. request logger and look for log messages about “Synchronous middleware … adapted” . I have been trying to do ...
Aakash_Deep's user avatar
1 vote
1 answer
718 views

I am relatively new to django. I recently deployed my application on a web server, and I find it very hard to debug issues. I am getting a 400 Http status code for some of my requests and not sure why....
michael's user avatar
  • 700
0 votes
1 answer
382 views

I need to only add the logger which logs all the api requests coming to my server. In the documentation, django.request Log messages related to the handling of requests. 5XX responses are raised as ...
anantdd's user avatar
  • 135
0 votes
2 answers
2k views

I am using basic logging functionality of django. I have configured logger as follow. What I need is , I want to create separate file every 24hrs in logs directory so that all the logs will be written ...
nerd_geek365's user avatar
0 votes
2 answers
2k views

I have a project in which some user can perform CRUD activities. I want to record who did what and when. Currently, I am thinking of making a model class UserAction(models.Model): user_id = models....
raj-kapil's user avatar
  • 477
0 votes
0 answers
1k views

Given the following logging config: settings.py LOGGING = { "version": 1, "disable_existing_loggers": False, "filters": { "require_debug_false&...
TropicalRaisel's user avatar
4 votes
2 answers
2k views

This is the log settings of my Django application. LOG_DIR = "logs" LOG_DIR_PATH = os.path.join(BASE_DIR, LOG_DIR) if not os.path.exists(LOG_DIR_PATH): os.mkdir(LOG_DIR_PATH) LOGGING = {...
Adnan Alam's user avatar
4 votes
1 answer
522 views

I am in confusion about django logger. I can not identify difference and purpose of "level" in logger and handler. I have configured a logger- "loggers": { "django&...
Samrat's user avatar
  • 103
0 votes
1 answer
1k views

What I'm experiencing is getting duplicate entries in my logs. I've looked around, and it seems that I have to set 'propagate': False in my loggers configuration which I have already done. However ...
Ravexina's user avatar
  • 2,938
0 votes
1 answer
1k views

I'm trying to setup Logging in my Django project... my first attempt, supposedly very simple, has been a failure so far. This is my LOGGING in settings.py: LOGGING = { 'version': 1, '...
Carlo Cogni 's user avatar
0 votes
1 answer
869 views

I am implementing logging for a Django web application through the Logging adapter. I am sending a custom prefix which is "[email protected]" before each logging message to identify the user ...
user1403505's user avatar
  • 1,015
2 votes
2 answers
2k views

I am not sure why django is not logging anything less than "WARNING" level. I have this code in the view: logger = logging.getLogger(__name__) def profile_data(request): logging.info(&...
Alejandro Veintimilla's user avatar
2 votes
2 answers
766 views

In my app, there is this API named 'UserChangeWorkScheduleViewSet' where its uri is 'host/api/v1/workSchedule' I have been trying to make a custom logging filter that would send me an error log ...
W.H.N.A.'s user avatar
  • 347
2 votes
0 answers
182 views

What is the best option for Django logging if I have info.log and error.log which are being shared across multiple processes? One option would be Multiprocessing, another option would be SocketHandler....
orlov_dumitru's user avatar
1 vote
1 answer
429 views

So, I have been working on utilizing this package: https://pypi.org/project/django-log-to-telegram/ I went through the exact steps the manual has: pip installing django log to telegram package, Added ...
W.H.N.A.'s user avatar
  • 347
0 votes
1 answer
1k views

I am fairly new in backend development. I was trying to write some log with Django rest framework. I set up the WSGI mode and the 000-default.conf file is <VirtualHost *:80> ServerAdmin user@...
sadat's user avatar
  • 4,390
1 vote
1 answer
663 views

I have trouble with the Django logging and setting the custom filter. This is my current settings: LOGGING = { 'version': 1, 'disable_existing_loggers': True, 'filters': { '...
Marko Zadravec's user avatar
-2 votes
1 answer
489 views

i created user - user 1 assigned group A user 2 assigned group B now i created login page and after login as user1 i want to redirect to page1.html and if logged in as user2 then redirect to page2....
ritu's user avatar
  • 53
0 votes
0 answers
195 views

Hi I wanted to create user accounts from django admin pannel and then use the email and passsword stored in the model to login? def login_view(request): context = {} user = request.user ...
Vinayak's user avatar
  • 37
8 votes
2 answers
11k views

Following is the logging snippet I have used in my django settings.py file. All the GET,POST requests are getting written to log but when i wrote logger.info("print something"), its not ...
Mahesh's user avatar
  • 1,325
0 votes
1 answer
539 views

I'm trying to log (by default) username and project (which can be decided from request object). I don't want to add context to every log manually. The problem is that I can't make Django to add ...
Milano's user avatar
  • 18.9k
2 votes
1 answer
1k views

I can easily create logs throughout the application using the logging module, but inside a django background task it does not work. import logging from background_task import background log = ...
Akira Kotsugai's user avatar
2 votes
0 answers
87 views

I'm using Django==2.2.11 and djangorestframework==3.11.0. When I run ./manage.py runserver and make an http request to the endpoint that has some database queries I got all the logging information. ...
deathangel908's user avatar
0 votes
1 answer
234 views

Django application uses logger but was not configured and I used this in settings.py: LOGGING = { 'version': 1, 'disable_existing_loggers': False, 'formatters': { 'verbose': { ...
user avatar
0 votes
1 answer
1k views

I have a django project on production. In my settings.py file Debug=False to avoid security risks which arrises when Debug=True I heard about python logging module which I am trying to set up. But ...
Наглый Спамер's user avatar
6 votes
3 answers
7k views

I've added the following logging configuration to my Django App's settings.py file: LOGGING = { 'version': 1, 'disable_existing_loggers': False, 'handlers': { 'console': { ...
Johnny Metz's user avatar
  • 5,867
2 votes
1 answer
5k views

I am using django for rest APIs. I do have a logging code in settings.py. LOGGING = { 'version': 1, 'disable_existing_loggers': False, 'formatters': { 'verbose': { '...
Amol Chakane's user avatar
  • 1,511
5 votes
1 answer
1k views

I have the following handler configuration for logging: "handlers": { 'system_file': { 'level': 'DEBUG', 'class': 'logging.handlers.TimedRotatingFileHandler', '...
DUDE_MXP's user avatar
  • 764
0 votes
1 answer
265 views

I have an application deployed on Heroku and sometimes it throws the server error 500 randomly. I am trying to implement logging in my project. I am reading the docs but I am missing some critical ...
Kaptan Singh's user avatar
2 votes
1 answer
1k views

The default behaviour of DRF is to throw exception for 5XX, but return valid response with error details for 4XX. I want to log request and response of any API call which fails with 4XX. Currently ...
Kumar Deepak's user avatar
2 votes
1 answer
2k views

I'm trying to put all the GET requests that appear in console into the database from django. For example: console log: [23/May/2019 13:58:44] "GET /testapp/ HTTP/1.1" 200 409 [23/May/2019 13:58:45] "...
Naeem Khan's user avatar
5 votes
1 answer
12k views

I have many application code written in python django and every application is using standard python logger module and just a simple message strings are getting logged. Now is there any way where I ...
Naggappan Ramukannan's user avatar
1 vote
1 answer
2k views

So, I am trying to create a logging system for my Django Project where I need to save all the different log level messages to different files. TLDR, I managed to get the Logs for particular level to ...
johnny68's user avatar
  • 431