NOAA-GFDL / CatalogBuilder

Toolset to build, validate, modify, and use intake-esm based data catalogs
3 stars 1 forks source link

Logger debug message for skipping #69

Open aradhakrishnanGFDL opened 6 days ago

aradhakrishnanGFDL commented 6 days ago

We will move the print to logger.debug for the Skipping file messages, per request. But, we need to figure out where these logs are going in the first place when one uses it from fre-cli. In the first iteration of the code, I had a log handler set up to redirect the logs to some file, but we removed it as @ceblanton wanted all the messages to go to the console. Looks like we now have a use-case, where perhaps fre-cli could set up the log handler, or leverage some tmp env var in the catalog builder.

This issue will simple change print to log.debug, and document where to find the log with and without fre-cli.

aradhakrishnanGFDL commented 6 days ago

User can redirect logs to somewhere else to see warning. See example

import logging hdlr = logging.FileHandler('/nbhome/a1r/logs/local.log') gen_intake_gfdl.logger.addHandler(hdlr)

See notebook example here