Commit c990b09b authored by eric pellegrini's avatar eric pellegrini
Browse files

implemented a write method so as ConsoleHandler behaves as a file-like object

parent 1b436c73
......@@ -82,6 +82,10 @@ class ConsoleHandler(IHandler, logging.Handler):
@type record: logging.LogRecord
record.msg = record.msg.strip()
if not record.msg:
# Set the the created text attribute as the default style for the text ctrl.
......@@ -91,5 +95,11 @@ class ConsoleHandler(IHandler, logging.Handler):
def write(self,message):
record = logging.LogRecord("console",logging.INFO,None,None,message,None,None,None)
REGISTRY["console"] = ConsoleHandler
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment