Skip to content

Commit baa416a

Browse files
authored
Correcting logging.md information
1 parent a26769e commit baa416a

File tree

1 file changed

+8
-16
lines changed

1 file changed

+8
-16
lines changed

Logging.md

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,9 @@
44
Logging framework has been introduced in the SDK which makes use of log4j2 and standardizes the logging so that it can be integrated with the logging in the client application.
55

66
## Setup
7-
In order to leverage the new logging framework, the following configuration settings may be added to the merchant configuration as part of LogConfiguration:
7+
In order to leverage the new logging framework, all logging configuration settings are entrusted to the log4j2 framework. For this, a new file `log4j.xml` has to be added to contain the configuration properties. A sample file has been provided below.
88

9-
* enableLog
10-
* logDirectory
11-
* logFilename
12-
* logMaximumSize
13-
14-
Have to be replaced by the following values:
15-
* props.setProperty("enableLog", "true"); // Logging to be enabled or not.
16-
* props.setProperty("logDirectory", "logs"); // Log directory Path
17-
* props.setProperty("logFilename", "cybs");
18-
* props.setProperty("logMaximumSize", "5M"); // Log file size in KB
19-
20-
where **`enableLog, logDirectory, logFilename, logMaximumSize`** are variables to be provided
9+
For more detailed information on how to change this configuration file, refer to [Apache Log4j2 Configuration](https://logging.apache.org/log4j/2.x/manual/configuration.html).
2110

2211

2312
## Log4j Configuration
@@ -88,10 +77,13 @@ where **`enableLog, logDirectory, logFilename, logMaximumSize`** are variables t
8877
```
8978

9079
### Important Notes
91-
* To enable masking of sensitive data i.e. sensitive data in the request/response should be hidden/masked, then replace `%m` with `%maskedMessage` in the patterns below -->
80+
* To enable masking of sensitive data i.e. sensitive data in the request/response should be hidden/masked, then replace `%m` with `%maskedMessage` in the pattern below:
81+
9282
```xml
9383
<PatternLayout pattern="%d{MM/dd/yy HH:mm:ss,SS:} [%t] %5p (%C{1}:%-1L) - %m%n"/>
94-
replace with
84+
```
85+
must be replaced with
86+
```xml
9587
<PatternLayout pattern="%d{MM/dd/yy HH:mm:ss,SS:} [%t] %5p (%C{1}:%-1L) - %maskedMessage%n"/>
9688
```
9789

@@ -109,4 +101,4 @@ where **`enableLog, logDirectory, logFilename, logMaximumSize`** are variables t
109101
* Phone Number
110102
* Type
111103
* Token
112-
* Signature
104+
* Signature

0 commit comments

Comments
 (0)