Re: Writing a custome Django Log Formatter.

2017-01-23 Thread Александр Христюхин (roboslone)
Filter applies to handlers, as you can see from my example. So what you need is a custom handler for loggers that require that some_id of yours. > On 23 Jan 2017, at 13:04, Arun S wrote: > > Hi, > > Thanks, I did this. But this applies to all the Modules in the Project. >

Re: Writing a custome Django Log Formatter.

2017-01-23 Thread Arun S
Hi, Thanks, I did this. But this applies to all the Modules in the Project. Basically my issue is when Django is running with Celery and there are more no of workers, the Logs needs to be diffrentiatied and also not for all the Modules of the project. So in order to apply for a particular

Re: Writing a custome Django Log Formatter.

2017-01-23 Thread Александр Христюхин (roboslone)
Hi, yes, it's absolutely possible. Refer to Django docs about logging (https://docs.djangoproject.com/en/1.10/topics/logging/ ) and logging docs (https://docs.python.org/3/library/logging.config.html#logging-config-dictschema

Writing a custome Django Log Formatter.

2017-01-23 Thread Arun S
Hi all, I have a small issue with writing a Custom Log Formatter. By default: log_format = '%(asctime)s %(module)s %(levelname)-8s- %(message)s' This is the Log formatter being used. But only in a few cases or rather in a few modules, i would like to include for ex: "some_id" as a seperator