def check_log_file_level(this_level, data, context, echoerr):
 havemarks(this_level)
 hadproblem = False
 top_level = context[0][1].get(u'common', {}).get(u'log_level', u'WARNING')
 top_level_str = top_level
 top_level_mark = getattr(top_level, u'mark', None)
 if ((not isinstance(top_level, unicode)) or (not hasattr(logging, top_level)) or (not isinstance(this_level, unicode)) or (not hasattr(logging, this_level))):
  return (True, False, hadproblem)
 top_level = getattr(logging, top_level)
 this_level_str = this_level
 this_level_mark = this_level.mark
 this_level = getattr(logging, this_level)
 if (this_level < top_level):
  echoerr(context=u'Error while checking log level index (key {key})'.format(key=context.key), context_mark=this_level_mark, problem=u'found level that is less critical then top level ({0} < {0})'.format(this_level_str, top_level_str), problem_mark=top_level_mark)
  hadproblem = True
 return (True, False, hadproblem)

def check_log_file_level ( this_level , data , context , echoerr ) : havemarks ( this_level ) hadproblem = False top_level = context [ 0 ] [ 1 ] . get ( u'common' , { } ) . get ( u'log_level' , u'WARNING' ) top_level_str = top_level top_level_mark = getattr ( top_level , u'mark' , None ) if ( ( not isinstance ( top_level , unicode ) ) or ( not hasattr ( logging , top_level ) ) or ( not isinstance ( this_level , unicode ) ) or ( not hasattr ( logging , this_level ) ) ) : return ( True , False , hadproblem ) top_level = getattr ( logging , top_level ) this_level_str = this_level this_level_mark = this_level . mark this_level = getattr ( logging , this_level ) if ( this_level < top_level ) : echoerr ( context = u'Error while checking log level index (key {key})' . format ( key = context . key ) , context_mark = this_level_mark , problem = u'found level that is less critical then top level ({0} < {0})' . format ( this_level_str , top_level_str ) , problem_mark = top_level_mark ) hadproblem = True return ( True , False , hadproblem )
check handler level specified in :ref:log_file key <config-common-log> this level must be greater or equal to the level in :ref:log_level key <config-common-log_level> .