title: Disable Django default colored logs
body: <p>I'm trying to take advantage of the default Django logging system and save those messages on a file.
  The only problem is that messages have color codes, that also get saved in the destination file handler.</p>
  <p>I added a custom file handler with a custom formatter to the &quot;django&quot; logger, but the message is still colored. I tried to debug a bit and I believe that there is some formatter working under the hood that add colors to the messages, since printing the messages received by my formatter shows that they already contain the color codes.</p>
  <p>I also tried creating a CustomServerFormatter which is a copy of django's default ServerFormatter (in which I saw the color codes were applied), but without the calls to add colors based on the HTTP response, but still no results.</p>
  <p>This is my current dictconfig:</p>
  <pre><code>LOGGING = {
  &quot;version&quot;: 1,
  &quot;disable_existing_loggers&quot;: False,
  &quot;filters&quot;: {
      &quot;require_debug_false&quot;: {
          &quot;()&quot;: &quot;django.utils.log.RequireDebugFalse&quot;,
      },
      &quot;require_debug_true&quot;: {
          &quot;()&quot;: &quot;django.utils.log.RequireDebugTrue&quot;,
      },
  },
  &quot;formatters&quot;: {
      &quot;django.server&quot;: {
          &quot;()&quot;: CustomServerFormatter,
          &quot;format&quot;: &quot;[{server_time}] {message}&quot;,
          &quot;style&quot;: &quot;{&quot;,
      },
      &quot;syslog_ws&quot;: {
          &quot;()&quot;: SyslogFormatter,
          'name': &quot;webs&quot;
      },
  },
  &quot;handlers&quot;: {
      &quot;console&quot;: {
          &quot;level&quot;: &quot;DEBUG&quot;,
          'filters': ['require_debug_true'],
          &quot;class&quot;: &quot;logging.StreamHandler&quot;,
      },
      &quot;file&quot;: {
          &quot;formatter&quot;: &quot;syslog_ws&quot;,
          &quot;level&quot;: &quot;INFO&quot;,
          &quot;class&quot;: &quot;logging.handlers.RotatingFileHandler&quot;,
          &quot;filename&quot;: &quot;/var/log/webs.log&quot;,
          &quot;mode&quot;: &quot;a&quot;,
          &quot;maxBytes&quot;: 1* 1024 * 1024,
          &quot;backupCount&quot;: 3,
      },
      &quot;django.server&quot;: {
          &quot;level&quot;: &quot;INFO&quot;,
          &quot;class&quot;: &quot;logging.StreamHandler&quot;,
          &quot;formatter&quot;: &quot;syslog_ws&quot;,
      },
      &quot;mail_admins&quot;: {
          &quot;level&quot;: &quot;ERROR&quot;,
          &quot;filters&quot;: [&quot;require_debug_false&quot;],
          &quot;class&quot;: &quot;django.utils.log.AdminEmailHandler&quot;,
      },
  },
  &quot;loggers&quot;: {
      &quot;django&quot;: {
          &quot;handlers&quot;: [&quot;console&quot;, &quot;file&quot;, &quot;mail_admins&quot;],
          &quot;level&quot;: &quot;INFO&quot;,
      },
      # &quot;django.server&quot;: {
      #     &quot;handlers&quot;: [&quot;django.server&quot;],
      #     &quot;level&quot;: &quot;INFO&quot;,
      #     &quot;propagate&quot;: False,
      # },
  },
  }
  </code></pre>
  <p>In the logging dictconfig there's no default formatter explictly specified so I don't know where to look at to solve this problem.</p>
  <p>Is there any way to disable this colors?</p>
  <p>Thanks in advance</p>