Module Expr Str Import alias Import alias ClassDef bases AttributeLoad NameLoad attr body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam defaults AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Expr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If CompareGtE AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Return Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr orelse Return Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad TryExcept body Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad handlers ExceptHandler body Raise orelse Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body If BoolOpAnd AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr Str UnaryOpNot AttributeLoad AttributeLoad NameLoad attr attr body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list decorator_list
N/A N/A 
Not mine, found over there:
http://code.activestate.com/recipes/576819-logging-to-console-without-surprises/

Licensed under the MIT License and slightly modified.
 N/A logging N/A sys LevelHandler N/A N/A logging StreamHandler N/A N/A A handler that logs to console in the sensible way.

    StreamHandler can log to *one of* sys.stdout or sys.stderr.

    It is more sensible to log to sys.stdout by default with only error
    (logging.ERROR and above) messages going to sys.stderr. This is how
    ConsoleHandler behaves.
     __init__ N/A N/A self stream_greater_or_equal stream_lower level N/A N/A sys stderr N/A sys stdout N/A logging ERROR N/A N/A 
        Initialize handler
         N/A N/A N/A N/A logging StreamHandler __init__ self N/A N/A self _level level N/A N/A self stream None N/A N/A self _stream_lower stream_lower N/A N/A self _stream_greater_or_equal stream_greater_or_equal N/A emit N/A N/A self record N/A N/A N/A 
        Overriden emit.
         N/A N/A N/A record levelno N/A self _level N/A N/A N/A N/A self _emit record N/A self _stream_greater_or_equal N/A N/A N/A N/A self _emit record N/A self _stream_lower N/A _emit N/A N/A self record stream N/A N/A N/A N/A self stream stream N/A N/A N/A N/A N/A N/A logging StreamHandler emit self record N/A N/A N/A N/A N/A N/A N/A self stream None N/A flush N/A N/A self N/A N/A N/A N/A N/A self stream N/A hasattr N/A self stream flush N/A N/A N/A self stream closed N/A N/A N/A N/A N/A logging StreamHandler flush self N/A N/A