init_arcgis_logger

init_arcgis_logger#

init_arcgis_logger(curr_logger: Logger, log_lvl: int = 20) None[source]#

Initialize a logger for tools running in the backend environment with run_in_conda_env function. This logger outputs information in JSON format to stdout, the run_in_conda_env function catches the JSON and print it properly to the user in ArcGis.

Parameters:
  • curr_logger (logging.Logger) – Logger to be initialize

  • log_lvl (int) – Logging level to be set

Example

>>> logger = logging.getLogger("logger_test")
>>> init_logger(logger, logging.INFO)
>>> logger.info("MESSAGE")