| Bookmark Name | Actions |
|---|
JBC API for TAFC Logger
This section explains the functionality of JBC API, which is a wrapper for TAFC logger. JBC API enables the JBASE BASIC code to use TAFC logger library. It works similar to TAFC logger 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 logger can use the same set of logger variables in tafc.ini. 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.
INCLUDE JBC.h
Logger("CUSTOMER", TAFC_LOG_INFO, "Test Program JBC-CUSTOMER")
Logger("ACCOUNT", TAFC_LOG_WARNING, "Test Program for JBC-ACCOUNT")
Logger("FUND-TRANSFER", TAFC_LOG_ERROR, "Test Program for JBC-FUND-TRANSFER"
The following screen capture displays the commands used to compile and generate executables.
This program produces the log files shown in the following screen capture.
The generated log files are:
You can define jBC section for logger variables in tafc.ini file as shown below.
Within jBC, each product can have individual sections such as CUSTOMER, ACCOUNT or FUNDSTRANSFER as shown in the following sample.
[CUSTOMER] MINLOGLEVEL_FILE=INFO [ACCOUNT] MINLOGLEVEL_FILE=ERROR [FUND-TRANSFER] MINLOGLEVEL_FILE=WARNING
Add Bookmark
save your best linksView Bookmarks
Visit your best linksIn this topic
Are you sure you want to log-off?