Class LogUtil

java.lang.Object
com.norconex.crawler.core.util.LogUtil

public final class LogUtil extends Object
  • Field Details

  • Method Details

    • setMdcCrawlerId

      public static void setMdcCrawlerId(String crawlerId)

      Sets two representations of the supplied crawler ID to the Mapped Diagnostic Context (MDC) for logging implementations supporting it:

      • crawler.id → the crawler id, as supplied.
      • crawler.id.safe → the crawler id encoded to be safe to use as filename on any file system, as per FileUtil.
      Parameters:
      crawlerId - crawler id
    • logCommandIntro

      public static void logCommandIntro(@NonNull @NonNull Logger logger, @NonNull @NonNull CrawlerConfig crawlConfig)