Logging

This section describes how to record content to logs in a business program.

1. Log levels and logging contents

Log levels and logging contents
Log level Logging contents Development Test Operation

TRACE

Indicates more detailed information than the DEBUG trace level.

O

X

X

DEBUG

Outputs logs for debugging purposes in the development environment.
Delete meaningless strings after development is completed.

O

X

X

INFO

Outputs only messages for test and verification purposes.

O

O

X

WARN

Outputs contents that need to be checked by an operator in the operation environment.
Outputs for the purpose of tracing the cause of failures.

O

O

O

ERROR

Outputs contents when an error (failure, abnormality) occurs.
Use the ERROR level for Exception occurrence logs as well.

O

O

O

  • As the log level decreases in the order TRACE > DEBUG > INFO > WARN > ERROR, the amount of output decreases.

  • Logs recorded at a lower level are also output at higher levels. (When the server setting is DEBUG, logs coded with INFO are also output.)

2. Logging method

Use org.slf4j.Logger, and declare the logger object as a member variable as shown below.

private final Logger logger = LoggerFactory.getLogger(this.getClass());

trace, debug, info, warn, error methods

// Fixed string logging
logger.debug("Logging content");

// IO object logging
logger.debug("Logging content : {}", input);

// Logging N items
logger.debug("Content1 : {}, Content2 : {}, Content3 : {}", input.getEmpNo(), input.getEmpNm(), input.getHireDt());

Logging an Exception object

logger.error("Error during acceptance processing", e);

3. Changing the log level

Log levels can be changed by accessing BXM Web Admin and using the [Online Management - Transaction Parameter Management] menu.

System log level: The currently configured system log level, which defines the level of logs output in the system (framework) area. DEFAULT means that it follows the system default settings.

Job log level: The currently configured job log level, which defines the level of logs output in the business area. DEFAULT means that it follows the system default settings.

DB log level: The currently configured DB log level, which defines the level of logs output by DBIO. DEFAULT means that it follows the system default settings.

log001
Figure 1. Transaction parameter edit popup
SWLab Bankware Global
  • 전체
  • BXM
  • BXCM
  • BXCP
  • BXI
제품 선택 시 더 정확한 매뉴얼 가이드를 제공해드립니다.

Copyright© Bankwareglobal All Rights Reserved.