OSFI-Java  3.9.2
OpenSF Integration Library
esa.opensf.osfi.Logger Class Reference

Static Public Member Functions

static boolean isDebugging ()
 
static boolean isColored ()
 
static void error (String message)
 
static void warning (String message)
 
static void info (String message)
 
static void debug (String message)
 
static void progress (int step, int nSteps)
 
static void finishExecution (int errorCode)
 
static void qualityReport (String name, double value)
 
static void qualityReport (String name, String value)
 
static void printMessage (String logType, String message, String fg, String bg)
 

Detailed Description

Logger.
Manages the log messages raised.

Author
ridr

Member Function Documentation

◆ debug()

static void esa.opensf.osfi.Logger.debug ( String  message)
static

Shows a formatted debug message, if the environment variable "DEBUG_MODE" is equal to "On". First time this function is called, checks the declaration of that variable. If it is not declared, presents a warning message and assumes it as "Off".

Parameters
message- text of the message

◆ error()

static void esa.opensf.osfi.Logger.error ( String  message)
static

Shows a formatted error message.

Parameters
message- text of the message

◆ finishExecution()

static void esa.opensf.osfi.Logger.finishExecution ( int  errorCode)
static

Shows an information message and exits the program execution with an specific error code.

Parameters
errorCode- Code of error to exit with.

◆ info()

static void esa.opensf.osfi.Logger.info ( String  message)
static

Shows a formatted information message.

Parameters
message- text of the message

◆ isColored()

static boolean esa.opensf.osfi.Logger.isColored ( )
static

Checks if the system is in color mode. OSFI_LOG_COLOR if ON the OSFI logs are colored.

  • Error : Red
  • Warning: Yellow
  • Progress: Cyan
  • Info: Green

◆ isDebugging()

static boolean esa.opensf.osfi.Logger.isDebugging ( )
static

Checks if the system is in debug mode.

◆ printMessage()

static void esa.opensf.osfi.Logger.printMessage ( String  logType,
String  message,
String  fg,
String  bg 
)
static

Shows a formatted information message of the given log type.

Parameters
logType
message
Deprecated:
Internal function, to be removed from public API

◆ progress()

static void esa.opensf.osfi.Logger.progress ( int  step,
int  nSteps 
)
static

Shows a formatted progress message.

Parameters
step- current step number
nSteps- maximum number of steps.

◆ qualityReport() [1/2]

static void esa.opensf.osfi.Logger.qualityReport ( String  name,
double  value 
)
static

Shows a formatted message reporting a quality indicator.

Parameters
name- Name of the quality indicator
value- Double associated to the quality indicator pointed by name

◆ qualityReport() [2/2]

static void esa.opensf.osfi.Logger.qualityReport ( String  name,
String  value 
)
static

Shows a formatted message reporting a quality indicator.

Parameters
name- Name of the quality indicator
value- String associated to the quality indicator pointed by name

◆ warning()

static void esa.opensf.osfi.Logger.warning ( String  message)
static

Shows a formatted warning message.

Parameters
message- text of the message

The documentation for this class was generated from the following file: