-
Notifications
You must be signed in to change notification settings - Fork 364
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update the logging properties to opt-out of the prefix events #844 #845
Merged
Merged
Changes from 1 commit
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
8b68f75
Update the logging properties to opt-out of the prefix events #844
mickeyz07 d3f2a2f
Update the logging properties to opt-out of the prefix events, second…
mickeyz07 6d8f307
Update the logging properties to opt-out of the prefix events, third …
mickeyz07 7822d6f
Update the logging properties to opt-out of the prefix events #844 fo…
mickeyz07 2e2d0e5
Update the logging properties to opt-out of the prefix events #844 fi…
mickeyz07 9ca8473
Merge branch 'ESAPI:develop' into issue-844
mickeyz07 c9d5b78
Update the logging properties to opt-out of the prefix events #844 si…
mickeyz07 54a7463
Update the logging properties to opt-out of the prefix events #844 se…
mickeyz07 17219b7
Update the logging properties to opt-out of the prefix events ESAPI#8…
mickeyz07 0e9bb76
Update the logging properties to opt-out of the prefix events ESAPI#8…
mickeyz07 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,6 +23,7 @@ | |
import org.owasp.esapi.LogFactory; | ||
import org.owasp.esapi.Logger; | ||
import org.owasp.esapi.codecs.HTMLEntityCodec; | ||
import org.owasp.esapi.errors.ConfigurationException; | ||
import org.owasp.esapi.logging.appender.LogAppender; | ||
import org.owasp.esapi.logging.appender.LogPrefixAppender; | ||
import org.owasp.esapi.logging.cleaning.CodecLogScrubber; | ||
|
@@ -70,7 +71,16 @@ public class Slf4JLogFactory implements LogFactory { | |
boolean logApplicationName = ESAPI.securityConfiguration().getBooleanProp(LOG_APPLICATION_NAME); | ||
String appName = ESAPI.securityConfiguration().getStringProp(APPLICATION_NAME); | ||
boolean logServerIp = ESAPI.securityConfiguration().getBooleanProp(LOG_SERVER_IP); | ||
boolean logPrefix = ESAPI.securityConfiguration().getBooleanProp(LOG_PREFIX, true); | ||
|
||
boolean logPrefix = true; | ||
try { | ||
logPrefix = ESAPI.securityConfiguration().getBooleanProp(LOG_PREFIX); | ||
} catch (ConfigurationException ex) { | ||
System.out.println("ESAPI: Failed to read Log Prefix configuration. Defaulting to enabled" + | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same as previous comment. |
||
". Caught " + ex.getClass().getName() + | ||
"; exception message was: " + ex); | ||
} | ||
|
||
SLF4J_LOG_APPENDER = createLogAppender(logUserInfo, logClientInfo, logServerIp, logApplicationName, appName, logPrefix); | ||
|
||
Map<Integer, Slf4JLogLevelHandler> levelLookup = new HashMap<>(); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please change the output to something that explicitly mentions the property name on the output sent to stderr. E.g., something like this:
That will make it easier for those getting this failure to know exactly what property to look for if they wish to change it in their ESAPI.properties file.