Issue #231 - Logging Rotation and Levels#295
Issue #231 - Logging Rotation and Levels#295ludoch merged 16 commits intoGoogleCloudPlatform:async-supportfrom
Conversation
….util.logging + Slf4j is now present, capturing logging events from: * commons-logging * log4j * java.util.logging * slf4j-api + Slf4j is configured to use java.util.logging as its source for output, appending, handlers, and configuration + Introducing appengine-java-logging CoreLogging with ability to configure user/app logging then system logging in a consisten way.
…s SystemLogger
| public static void init(File appConfigFile) throws IOException { | ||
| // Use App (User) Configuration specified as a file parameter | ||
| if (appConfigFile != null && appConfigFile.exists()) { | ||
| debug("Loading User Config (from file): %s", appConfigFile); |
There was a problem hiding this comment.
Do you think the context would be enough to make "User Config" clear or should we say "User log config..." ?
There was a problem hiding this comment.
Well, we could call it "App Config" if that makes it easier to understand.
| logManager.reset(); // close & remove existing handlers, reset existing logger levels | ||
| logManager.readConfiguration(is); | ||
| } catch (SecurityException | IOException e) { | ||
| warning("Warning: caught exception when reading logging properties: %s", configFile |
There was a problem hiding this comment.
Is the "Warning" prefix needed now?
|
@aozarov Would you have some cycles to review this PR? Thanks. |
|
ack On Wed, Aug 17, 2016 at 3:51 PM, Greg Wilkins notifications@github.com
|
|
@aozarov Do you have a chance to take another look at this PR? Thanks! |
| private List<String> events; | ||
|
|
||
| public JsonCaptureHandler() { | ||
| formatter = new JsonFormatter(); |
There was a problem hiding this comment.
Nit. Any reason for not assigning in the declaration and avoiding the need for an explicit constructor? Also, could events be final ?
|
Added some comments. Didn't finish my pass. Should be done with it tomorrow. |
|
Wow @aozarov Thanks for the review, I'll cover these current ones tomm with a few extra commits to this PR. |
| return record.getMessage(); | ||
| } | ||
| } | ||
|
|
|
Done with my review. |
| import java.util.logging.Logger; | ||
|
|
||
| /** | ||
| * The {@link java.util.logging.Handler} responsible for capturing the |
|
Looks good. I think this comment should still be addressed but fine with merging it as is. |
|
LGTM, will merge soon. |
|
Changes in gcr.io/google_appengine/jetty9-compat:githubheadasync |
|
revert is pushed as gcr.io/google_appengine/jetty9-compat:2016-09-02_00000 and gcr.io/google_appengine/jetty9-compat:githubheadasync |
This PR introduces a bunch of updates to the logging to enable log rotation for both the app_.json and request_.log
We can tweak the rotation numbers in a later commit, but its currently setup as ...
This also includes the ability to capture log4j & commons-logging & slf4j and route it to the java.util.logging setup.
request logging is also using this new logging layer (not using the older Jetty FileRollover implementation)