Log Diagnostic Information

Updated: Sep 19, 2023

For this example, you will learn how to use DataPipeline to log diagnostic information.  You can run diagnostics to troubleshoot setup and environment issues. 

 

Java code listing

package com.northconcepts.datapipeline.examples.cookbook;

import com.northconcepts.datapipeline.diagnostic.Diagnostic;

public class LogDiagnosticInfo {

    public static void main(String[] args) {
        // Approach 1:
        new Diagnostic().log();

        System.out.println("\n\n\n");

        // Approach 2:
        System.out.println(new Diagnostic().toString());
    }
}

 

Code walkthrough

  1. Diagnostic will be used to diagnose the environmental issues.
  2. new Diagnostic().log() enables the logging of the diagnostic information.
  3. You can either do the logging by new Diagnostic().log() or System.out.println(new Diagnostic().toString()).
  4. System.out.println(new Diagnostic().toString()) prints the diagnostic information.

Diagnostic

Helps diagnose environmental issues by collecting properties and logging them to the console.

The properties collected are:

  • Local date and timezone.
  • Location of license file (if present).
  • Location of DataReader class file.
  • Number of records transfered in a single job (out of 100 million records).
  • All JVM properties.

No personal information, IP addresses, or geographic data are collected.

Mobile Analytics