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

FISH-205 Implement Dynamic Micro Logging Properties #4739

Merged
merged 3 commits into from
Jul 6, 2020
Merged

FISH-205 Implement Dynamic Micro Logging Properties #4739

merged 3 commits into from
Jul 6, 2020

Conversation

MattGill98
Copy link
Contributor

Description

When running Payara Micro with --enableDynamicLogging the logging properties file will be copied into the exploded directory and read again.

Testing

To reproduce, use the following log properties file:

#Payara Micro Logging Properties File

## Handlers
handlers=java.util.logging.ConsoleHandler
java.util.logging.ConsoleHandler.formatter=com.sun.enterprise.server.logging.ODLLogFormatter
com.sun.enterprise.server.logging.ODLLogFormatter.ansiColor=true
java.util.logging.ConsoleHandler.level=FINE

## Global Level
.level=INFO

#All log level details
PayaraMicro.level=INFO

Run Payara Micro with --logproperties and notice that changing the file doesn't print anything.
Run Payara Micro also with --enableDynamicLogging and change the global log level to FINE. Notice that an INFO log appears saying log levels have been updated. Change the global log level back to INFO, and notice a new FINE level message has been logged.

@MattGill98 MattGill98 self-assigned this Jun 23, 2020
@MattGill98
Copy link
Contributor Author

jenkins test please

1 similar comment
@MattGill98
Copy link
Contributor Author

jenkins test please

Copy link
Member

@Pandrex247 Pandrex247 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code comments - still need to actually test

@MattGill98
Copy link
Contributor Author

I'll make all of the code style changes once I've had a functional review!

Copy link
Member

@Pandrex247 Pandrex247 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given it a test (on Linux) - appears to work 👌
Also tried deleting the file to check that logic - also seems to work 👍
I still stand by my previous comments though 😉

Created a file watching service that can be interacted with statically
to allow the Payara Micro boot sequence to queue up paths to watch
before HK2 starts. Works by allowing any classto register actions to
complete when a specific file or path is modified.

The static methods will still work post-startup as the loop checks the
static list.

Signed-off-by: Matthew Gill <[email protected]>
The flag isn't currently linked to anything, but whilst its
non-functional the groundwork should still be in place to work properly
in Payara Micro.

Signed-off-by: Matthew Gill <[email protected]>
The --enableDynamicLogging option now makes use of the file watcher
service to dynamically update logging properties.

Signed-off-by: Matthew Gill <[email protected]>
@MattGill98
Copy link
Contributor Author

jenkins test please

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants