Skip to content

How to use the MAPL logging library, aka "pFlogger"

Tom Clune edited this page Mar 4, 2022 · 3 revisions

Introduction

MAPL now includes an logging library known as "FPLOGGER". The library is similar in spirit to the python logger. The logging specifications are described at runtime by a Yaml file. If using a MAPL application application such the GEOSgcm.x, GEOSldas.x etc... that uses the MAPL_Cap, the logging file can be passed to the application via the command line argument --logging_config. The Yaml file consists of top level keys in the dictionary named locks:, formatters:, handlers:, root:, and loggers: each of these can defined multiple entries if you want to define different formatters, handlers, etc...

Lock Description

Formatter Description

formatter_name:
  class: options, Formatter, MpiFormatter
  format: 
  comm: 

Handler Description

handler_name:
  class:
  filename:
  lock:
  level:
  formatter:
  rank_keyword:
  comm:
  unit:

Root

Loggers

Example with ExtData

   CAP.EXTDATA:
       handlers: [mpi_shared]
       level: WARNING
       root_level: DEBUG
Clone this wiki locally