Skip to content
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

Closed
mickeyz07 opened this issue Jun 11, 2024 · 2 comments
Closed

Update the logging properties to opt-out of the prefix events #844

mickeyz07 opened this issue Jun 11, 2024 · 2 comments

Comments

@mickeyz07
Copy link
Contributor

mickeyz07 commented Jun 11, 2024

I would like to disable the usage of [SECURITY SUCCESS -> /com.microservices.project.handlers.SecurityHandler]

Before the usage of ESAPI the logged line was:
2024-05-03 15:14:13,912 INFO c.t.m.e.h.SecurityHandler [pool-3-thread-1] Successfully transformed security update #1

With the ESAPI the logged line becomes:
2024-05-03 15:14:13,912 INFO [pool-3-thread-1] o.o.e.l.s.Slf4JLogLevelHandlers$3: [SECURITY SUCCESS -> /com.microservices.project.handlers.SecurityHandler] Successfully transformed security update #1

As Jeremiah J. Stacey confirmed in our email conversation, following needs to be done:

  • The system default should maintain the current capability if a property is not provided.
  • The property should be read in as part of the LogFactory initialization process, and passed to the constructor of the LogPrefixAppender
    • This will need to be applied to all of the LogFactory implementations for consistency.
  • The LogPrefixAppender will need to have a new argument to its constructor, and a new member variable too store the reference
  • The LogPrefixAppender.appendTo method will need to be updated to set the boolean configurations on both the EventTypeLogSupplier and the ServerInfoSupplier
  • The EventTypeLogSupplier should be expanded to provide a public setter for the boolean configuration on whether to log, and the get method will need to be updated to return an empty string when the event type is disabled.
  • The ServerInfoSupplier will need an additional public setter for the classpath optional set, and the get method will need to be updated for that additional logical path.
  • Tests will need to be added for the new APIs for each of the suppliers to show the behavior when both enabled and disabled match expectations.
@jeremiahjstacey jeremiahjstacey changed the title Update the properties to opt-out of the prefix events Update the logging properties to opt-out of the prefix events Jun 11, 2024
@kwwall
Copy link
Contributor

kwwall commented Jun 12, 2024 via email

mickeyz07 added a commit to mickeyz07/esapi-java-legacy_MZ that referenced this issue Jun 25, 2024
mickeyz07 added a commit to mickeyz07/esapi-java-legacy_MZ that referenced this issue Jun 28, 2024
mickeyz07 added a commit to mickeyz07/esapi-java-legacy_MZ that referenced this issue Jul 1, 2024
mickeyz07 added a commit to mickeyz07/esapi-java-legacy_MZ that referenced this issue Jul 10, 2024
mickeyz07 added a commit to mickeyz07/esapi-java-legacy_MZ that referenced this issue Jul 24, 2024
mickeyz07 added a commit to mickeyz07/esapi-java-legacy_MZ that referenced this issue Jul 31, 2024
mickeyz07 added a commit to mickeyz07/esapi-java-legacy_MZ that referenced this issue Sep 3, 2024
mickeyz07 added a commit to mickeyz07/esapi-java-legacy_MZ that referenced this issue Sep 5, 2024
kwwall pushed a commit that referenced this issue Sep 5, 2024
)

* Update the logging properties to opt-out of the prefix events #844

* Update the logging properties to opt-out of the prefix events, second iteration for #844

* Update the logging properties to opt-out of the prefix events, third iteration

* Update the logging properties to opt-out of the prefix events #844 fourt iteration

* Update the logging properties to opt-out of the prefix events #844 fifth iteration

* Update the logging properties to opt-out of the prefix events #844 sixt iteration

* Update the logging properties to opt-out of the prefix events #844 seventh iteration

* Update the logging properties to opt-out of the prefix events #844 eigth iteration

* Update the logging properties to opt-out of the prefix events #844 ninth iteration
@kwwall
Copy link
Contributor

kwwall commented Oct 5, 2024

Closed via PR #845

@kwwall kwwall closed this as completed Oct 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants