color_enabled is initialized on line 58 of msg.py.  I did this in the same way as other class variables are initialized.<div><br></div><div><div>    levelnames = {</div><div>        DEBUG3   : &#39;DEBUG&#39;,</div><div>        DEBUG2   : &#39;DEBUG&#39;,</div>
<div>        DEBUG   : &#39;DEBUG&#39;,</div><div>        VERBOSE: &#39;NOTE&#39;,</div><div>        NOTE    : &#39;NOTE&#39;,</div><div>        PLAIN  : &#39;&#39;,</div><div>        WARNING : &#39;WARNING&#39;,</div><div>
        ERROR   : &#39;ERROR&#39;,</div><div>        CRITICAL: &#39;ERROR&#39;,</div><div>    }</div><div><br></div><div>    color_enabled = False</div><div>    BLACK, RED, GREEN, YELLOW, BLUE, MAGENTA, CYAN, WHITE = range(30,38)</div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sun, Nov 11, 2012 at 4:54 PM, Chris Larson <span dir="ltr">&lt;<a href="mailto:clarson@kergoth.com" target="_blank">clarson@kergoth.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="gmail_extra"><br><br><div class="gmail_quote">On Sun, Nov 11, 2012 at 8:17 AM, Seth Bollinger <span dir="ltr">&lt;<a href="mailto:seth.boll@gmail.com" target="_blank">seth.boll@gmail.com</a>&gt;</span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><font face="arial, sans-serif">@@ -67,6 +86,8 @@ class BBLogFormatter(logging.Formatter):</font></div>
<div><font face="arial, sans-serif">         if record.levelno == self.PLAIN:</font></div><div><font face="arial, sans-serif">             msg = record.getMessage()</font></div><div><font face="arial, sans-serif">         else:</font></div>



<div><font face="arial, sans-serif">+            if self.color_enabled:</font></div><div><font face="arial, sans-serif">+                self.colorize(record)</font></div></blockquote></div><br><br>I&#39;m not seeing your definition of color_enabled in the constructor. Wouldn&#39;t this attribute not exist when it&#39;s first created, before enable_color() is called? Have you tested this with a non-interactive terminal? I&#39;d think you&#39;d want a self.color_enabled = False in the constructor for the formatter.<span class="HOEnZb"><font color="#888888"><br>


-- <br>Christopher Larson<br>
</font></span></div>
</blockquote></div><br></div>