Skip to content

nileshnikalje/test-log-redactor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Steps to build the project

  1. Assemble the project using "mvn assembly:assembly"

Steps to reproduce the issue. Execute the following commands

  1. cd target

  2. Try running the main class by executing "java -cp .:./tesl4j-1.0-jar-with-dependencies.jar com.main.App"

  3. The output should be displayed as

2018-05-08 11:49:32,583 [main] DEBUG org.cloudera.LogMessage1 - From pkg1.LogMessage1 : Mask PASSWORD(ABCD) 2018-05-08 11:49:32,584 [main] DEBUG org.example.LogMessage2 - From pkg2.LogMessage2 : Mask PASSWORD(ABCD)

  1. The password ABCD is not masked.

  2. Edit the log4j.properties file and uncomment the line number 10 to apply the redactor appenders MASK_PASSWORDS_CONSOLE and MASK_PASSWORDS_FILE to the package com.test.example

log4j.logger.com.test.example=DEBUG, MASK_PASSWORDS_CONSOLE, MASK_PASSWORDS_FILE

  1. Save the file and run the main class again by executing "java -cp .:./testl4j.jar com.main.App"

  2. The password is now masked but for both the packages when we have specified it for just one.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages