tools/perf/cli_tools/pinboard/pinboard.py
def SetUpLogging(level):
  """Set up logging to log both to stderr and a file."""
  logger = logging.getLogger()
  logger.setLevel(level)
  formatter = logging.Formatter(
      '(%(levelname)s) %(asctime)s [%(module)s] %(message)s')

  h1 = logging.StreamHandler()
  h1.setFormatter(formatter)
  logger.addHandler(h1)

  h2 = handlers.TimedRotatingFileHandler(
     filename=CachedFilePath('pinboard.log'), when='W0', backupCount=5)
  h2.setFormatter(formatter)
  logger.addHandler(h2)
Set up logging to log both to stderr and a file.
Set up logging to log both to stderr and a file.
Set up logging to log both to stderr and a file .
def SetUpLogging(level):
  logger = logging.getLogger()
  logger.setLevel(level)
  formatter = logging.Formatter(
      '(%(levelname)s) %(asctime)s [%(module)s] %(message)s')
  h1 = logging.StreamHandler()
  h1.setFormatter(formatter)
  logger.addHandler(h1)
  h2 = handlers.TimedRotatingFileHandler(
     filename=CachedFilePath('pinboard.log'), when='W0', backupCount=5)
  h2.setFormatter(formatter)
  logger.addHandler(h2)
def SetUpLogging ( level ) : logger = logging . getLogger ( ) logger . setLevel ( level ) formatter = logging . Formatter ( '(%(levelname)s) %(asctime)s [%(module)s] %(message)s' ) h1 = logging . StreamHandler ( ) h1 . setFormatter ( formatter ) logger . addHandler ( h1 ) h2 = handlers . TimedRotatingFileHandler ( filename = CachedFilePath ( 'pinboard.log' ) , when = 'W0' , backupCount = 5 ) h2 . setFormatter ( formatter ) logger . addHandler ( h2 )
Set up logging to log both to stderr and a file.
Set up logging to log both to stderr and a file .
"""Set up logging to log both to stderr and a file."""
level