-
Notifications
You must be signed in to change notification settings - Fork 17
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
Log4j Settings package lookup failing for a lot of packages #25
Comments
hi, could you please test replacing the source code of admin-log-settings.post.js with this:
|
The problem with the old method is if the package hasn't been defined initially in Log4 there is not an mbean to manipulate it... with this new way we push directly the mbean. |
Ok, tried it out, first I had to add the packagename and priority to the addLogger function for it to run without exception. Then I got the same failure as before :( Using the Oracle JVM btw (1.7 on Alfresco 4.2.6) |
Ok, replace the three files attached here admin-log-settings.zip This is based on the work form my friend and colleague Marco Mancuso: |
Tried changing log level but the package lookup fails for a lot of packages. For example, setting "org.alfresco.repo.web.scripts.activities.feed" to DEBUG gives error message: "08:56:20 - Failed: package org.alfresco.repo.web.scripts.activities.feed not found".
Looked through the source code and it seems to be something in the jmx.queryMBeans function that fails to find the package (line 36 of admin-log-settings.post.js Tried:
var matchingBeans = jmx.queryMBeans("log4j:logger=" + "org.alfresco.repo.web.scripts.activities.feed");
Which returns an empty ScriptMBean.
Addressing a class in the package works in this case:
var matchingBeans = jmx.queryMBeans("log4j:logger=" + org.alfresco.repo.web.scripts.activities.feed.UserFeedRetrieverWebScript");
The text was updated successfully, but these errors were encountered: