Return-Path: X-Original-To: apmail-aurora-commits-archive@minotaur.apache.org Delivered-To: apmail-aurora-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id EAC1E18481 for ; Wed, 27 Jan 2016 21:52:16 +0000 (UTC) Received: (qmail 63158 invoked by uid 500); 27 Jan 2016 21:52:16 -0000 Delivered-To: apmail-aurora-commits-archive@aurora.apache.org Received: (qmail 63122 invoked by uid 500); 27 Jan 2016 21:52:16 -0000 Mailing-List: contact commits-help@aurora.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@aurora.apache.org Delivered-To: mailing list commits@aurora.apache.org Received: (qmail 63113 invoked by uid 99); 27 Jan 2016 21:52:16 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 27 Jan 2016 21:52:16 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 9D35EDFE61; Wed, 27 Jan 2016 21:52:16 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: zmanji@apache.org To: commits@aurora.apache.org Message-Id: <1015334dcbcd4fbf867f0d55b4798b9b@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: aurora git commit: Enable H2 logging to slf4j. Date: Wed, 27 Jan 2016 21:52:16 +0000 (UTC) Repository: aurora Updated Branches: refs/heads/master e2a973e1e -> c417f9d09 Enable H2 logging to slf4j. On a test cluster with DbTaskStore enabled there are several lines in the log that look like: ```` 2016-01-26 13:07:14 jdbc[15]: exception ```` There is no other information with these lines. This is a result of setting `TRACE_LEVEL_SYSTEM_OUT` to `1` for H2. This will print out the error message but not the associated throwable: https://github.com/h2database/h2database/blob/a932268843ac84c7a665e427167ff2eb291d6b8e/h2/src/main/org/h2/message/TraceSystem.java#L228 The SLF4J implementation of tracing in H2 does not suffer from this restriction. Reviewed at https://reviews.apache.org/r/42845/ Project: http://git-wip-us.apache.org/repos/asf/aurora/repo Commit: http://git-wip-us.apache.org/repos/asf/aurora/commit/c417f9d0 Tree: http://git-wip-us.apache.org/repos/asf/aurora/tree/c417f9d0 Diff: http://git-wip-us.apache.org/repos/asf/aurora/diff/c417f9d0 Branch: refs/heads/master Commit: c417f9d099299c06d02f5f2214a69966ebbab716 Parents: e2a973e Author: Zameer Manji Authored: Wed Jan 27 13:52:02 2016 -0800 Committer: Zameer Manji Committed: Wed Jan 27 13:52:02 2016 -0800 ---------------------------------------------------------------------- .../org/apache/aurora/scheduler/storage/db/DbModule.java | 8 +++----- src/main/resources/logback.xml | 6 +++++- 2 files changed, 8 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/aurora/blob/c417f9d0/src/main/java/org/apache/aurora/scheduler/storage/db/DbModule.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/aurora/scheduler/storage/db/DbModule.java b/src/main/java/org/apache/aurora/scheduler/storage/db/DbModule.java index 36c462a..8b8c54a 100644 --- a/src/main/java/org/apache/aurora/scheduler/storage/db/DbModule.java +++ b/src/main/java/org/apache/aurora/scheduler/storage/db/DbModule.java @@ -115,11 +115,9 @@ public final class DbModule extends PrivateModule { // READ COMMITTED transaction isolation. More details here // http://www.h2database.com/html/advanced.html?#transaction_isolation .put("LOCK_MODE", "3") - // Error-level reporting for H2. - // See http://www.h2database.com/html/features.html#trace_options - // TODO(wfarner): H2 can ship these to slf4j, but is too noisy at our default level (info). - // Use this logging and reduce the default level for h2's logger. - .put("TRACE_LEVEL_SYSTEM_OUT", "1") + // Send log messages from H2 to SLF4j + // See http://www.h2database.com/html/features.html#other_logging + .put("TRACE_LEVEL_FILE", "4") // Enable Query Statistics .put("QUERY_STATISTICS", "TRUE") .build(); http://git-wip-us.apache.org/repos/asf/aurora/blob/c417f9d0/src/main/resources/logback.xml ---------------------------------------------------------------------- diff --git a/src/main/resources/logback.xml b/src/main/resources/logback.xml index faf0dbc..84c175c 100644 --- a/src/main/resources/logback.xml +++ b/src/main/resources/logback.xml @@ -18,7 +18,7 @@ limitations under the License. to provide a reasonable default, but allow users to override in any format they wish. http://logback.qos.ch/manual/configuration.html --> - + System.err @@ -27,6 +27,10 @@ limitations under the License. + + + +