11

Is there a way to make the runserver command completely quiet or just display errors like 404 or 500 ?? verbosity option has no effect on it...

2
  • Are you trying to remove noise in your command prompt? Jan 21, 2011 at 1:11
  • Just checking. Have you tried --verbosity=0
    – Gal Bracha
    Nov 22, 2012 at 14:17

3 Answers 3

14

You can now set the verbosity with the verbosity flag:

./manage.py runserver --verbosity 0

Documentation

3
9

There is no way to make the command less verbose with options. You can however pipe the output someplace where you don't need to care about it. On Linux/OS X/*nix you can pipe the output to /dev/null with something like:

$ ./manage.py runserver > /dev/null

The equivalent on windows would be something like:

python manage.py runserver > NUL

One last note: If you are seeking to suppress the output as a matter of preference in your development environment, awesome! This should work for you. If you are seeking to do this for almost any other reason, it's probably a sign that you are using the dev server for something which you shouldn't. "./manage.py runserver" should never be used for anything other than local development.

1
  • 2
    +1 for "runserver should never be used for anything other than local development"
    – sidhshar
    Jan 21, 2011 at 5:16
0

I managed to pull it off by disabling logging in general, as I am launching my application as a subprocess of different application. Documentation.

This blocks all logs including Watching for file changes with StatReloader.

And all logs of this kind: [31/Jul/2020 20:42:17] "GET /admin/ HTTP/1.1" 200 6641.

By adding this to my settings.py:

LOGGING = {
    "version": 1,
    "disable_existing_loggers": True,
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.