<s> import logging <EOL> import asyncio <EOL> class Logger : <EOL> DEFAULT = '<STR_LIT>' <EOL> RED = '<STR_LIT>' <EOL> GREEN = '<STR_LIT>' <EOL> YELLOW = '<STR_LIT>' <EOL> BLUE = '<STR_LIT>' <EOL> MAGENTA = '<STR_LIT>' <EOL> CYAN = '<STR_LIT>' <EOL> WHITE = '<STR_LIT>' <EOL> @ classmethod <EOL> def c ( cls , color , msg ) : <EOL> return "<STR_LIT>" % ( color , msg , cls . DEFAULT ) <EOL> def __init__ ( self ) : <EOL> pass <EOL> def info ( self , message ) : <EOL> logging . info ( c ( self . CYAN , "<STR_LIT>" , message ) ) <EOL> def warn ( self , message ) : <EOL> logging . warn ( c ( self . YELLOW , "<STR_LIT>" , message ) ) <EOL> def error ( self , message ) : <EOL> logging . error ( "<STR_LIT>" , message ) <EOL> def critical_error ( self , message ) : <EOL> logging . error ( "<STR_LIT>" , message ) <EOL> def __call__ ( self , req , res ) : <EOL> logging . info ( "<STR_LIT>" . format ( req . ip ) ) <EOL> req . log = self </s>
