Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error format in log and how to add time query execute #77

Closed
idontgotit opened this issue Aug 14, 2019 · 0 comments
Closed

Error format in log and how to add time query execute #77

idontgotit opened this issue Aug 14, 2019 · 0 comments

Comments

@idontgotit
Copy link

idontgotit commented Aug 14, 2019

i have issue when log it to file: My log like it:

^[[36m{'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.103 Safari/537.36', 'HTTP_HOST': 'localhost:8000', 'HTTP_ACCEPT_ENCODING': 'gzip, deflate, br',$ ^[[36mGET /swagger/ - 200^[[0m ^[[36mGET /swagger/?format=openapi^[[0m

How to remove ^[[36m and ^[[0m in my log file?

My config :
LOGGING = { 'version': 1, 'disable_existing_loggers': False, 'handlers': { 'file': { 'level': 'DEBUG', 'class': 'logging.FileHandler', 'filename': '/var/log/app-logs/django.log', }, }, 'loggers': { 'django.request': { 'handlers': ['file'], 'level': 'DEBUG', 'propagate': True, } } }

I want add time query execute for check log better. How to add it? I cant find a way do it in google.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant