JBC API for TAFC jLogger

This section explains the functionality of JBC API, which is a wrapper for TAFC jLogger. JBC API enables the JBASE BASIC code to use TAFC jLogger library. It works similar to TAFC jLogger library and provides you a function to generate logging at different levels shown below.

  • TAFC_LOG_INFO
  • TAFC_LOG_WARNING
  • TAFC_LOG_ERROR
  • TAFC_LOG_FATAL

TAFC jLogger can use the same set of logger variables in tafc.properties. You can however configure the JBC logger variable using [jBC] section.

JBC API Logger function is given below.

Logger (VAR Category, VAR Severity, VAR Message)

Sample program on how to use Logger function is given below.

PROGRAM Sample.b
INCLUDE JBC.h
Logger ("CUSTOMER", TAFC_LOG_INFO, "Program for CUSTOMER")
Logger ("FUND-TRANSFER", TAFC_LOG_ERROR, "Program for FUNDS")
Logger ("ACCOUNT", TAFC_LOG_WARNING, "Program for ACCOUNT")
END

The following screen capture displays the commands used to compile and generate executables.

Output log file is shown below.

The generated log files are:

  • INFO log file

  • WARNING log file

  • ERROR log file


Bookmark Name Actions
Feedback
x