-
Notifications
You must be signed in to change notification settings - Fork 148
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
New feature: Admin command logger #24993
Merged
arjantijms
merged 9 commits into
eclipse-ee4j:master
from
OndroMih:ondromih-admin-command-logger
Jun 25, 2024
Merged
New feature: Admin command logger #24993
arjantijms
merged 9 commits into
eclipse-ee4j:master
from
OndroMih:ondromih-admin-command-logger
Jun 25, 2024
Conversation
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
…console System property to configure the level of logged commands. Refactoring to use HK2 topic to trigger the command recorder (depends on a fix in HK2)
Until the HK2 extras OSGi manifest is fixed
So that it can be used in any module. Added documentation on writing listeners.
OndroMih
force-pushed
the
ondromih-admin-command-logger
branch
from
June 22, 2024 00:48
d52b989
to
21ff1b0
Compare
OndroMih
changed the title
Ondromih admin command logger
New feature: Admin command logger
Jun 22, 2024
arjantijms
reviewed
Jun 23, 2024
arjantijms
reviewed
Jun 23, 2024
...st-service/src/main/java/org/glassfish/admin/rest/adapter/JerseyContainerCommandService.java
Show resolved
Hide resolved
arjantijms
approved these changes
Jun 24, 2024
avpinchuk
approved these changes
Jun 24, 2024
hs536
approved these changes
Jun 25, 2024
dmatej
reviewed
Jun 25, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #24992
Provides a mechanism that logs admin commands that are invoked by the Admin Console, Admin CLI or the REST admin interface.
Demo of the functionality:
2024-06-21.17-56-45.mp4
Configuration as described in the docs in the PR. Copy of the docs here:
It's possible to log admin commands executed either using the asadmin CLI, Admin Console, or the REST interface.
To enable this logging, set the system property
glassfish.commandlogger.logmode
on the DAS server to one of the following values:ALL_COMMANDS
- will log all commandsWRITE_COMMANDS
- will log all commands that modify server configurationINTERNAL_COMMANDS
- will log all commands that modify server configuration and also those that start with_
(internal commands)READ_WRITE_COMMANDS
- will log all commands that modify server configuration or return info about the configurationNO_COMMAND
- do not log any command, this is the default value if the property not specifiedThe log message will be logged using
org.glassfish.extras.commandlogger.AdminCommandLogger
logger withINFO
level, and will contain:The name and arguments can be copied and pasted to the asadmin CLI to repeat running the same command from the command line.
Note: SimpleTopicDistributionService.java is a temporary solution until eclipse-ee4j/glassfish-hk2#1058 is released and a new version of HK2 is integrated.