tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tveron...@apache.org
Subject [4/5] tomee git commit: using new log category for this type of logging
Date Fri, 27 Oct 2017 17:59:10 GMT
using new log category for this type of logging


Project: http://git-wip-us.apache.org/repos/asf/tomee/repo
Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/07fe3500
Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/07fe3500
Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/07fe3500

Branch: refs/heads/tomee-1.7.x
Commit: 07fe35001225e5e0b0e196c593bb2232fd8b1527
Parents: e7f96f2
Author: Thiago Veronezi <thiago@veronezi.org>
Authored: Fri Oct 27 11:58:34 2017 -0400
Committer: Thiago Veronezi <thiago@veronezi.org>
Committed: Fri Oct 27 11:58:34 2017 -0400

----------------------------------------------------------------------
 .../openejb/monitoring/StatsInterceptor.java      |  4 ++--
 .../java/org/apache/openejb/util/LogCategory.java |  1 +
 .../apache/openejb/monitoring/Messages.properties | 18 ++++++++++++++++++
 .../openejb/util/resources/Messages.properties    |  3 ---
 4 files changed, 21 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tomee/blob/07fe3500/container/openejb-core/src/main/java/org/apache/openejb/monitoring/StatsInterceptor.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/main/java/org/apache/openejb/monitoring/StatsInterceptor.java
b/container/openejb-core/src/main/java/org/apache/openejb/monitoring/StatsInterceptor.java
index 393b315..f9fa1e7 100644
--- a/container/openejb-core/src/main/java/org/apache/openejb/monitoring/StatsInterceptor.java
+++ b/container/openejb-core/src/main/java/org/apache/openejb/monitoring/StatsInterceptor.java
@@ -112,7 +112,7 @@ public class StatsInterceptor {
         record(invocationContext, PostConstruct());
         long end = System.nanoTime();
         org.apache.openejb.util.Logger
-                .getInstance(LogCategory.OPENEJB, "org.apache.openejb.util.resources")
+                .getInstance(LogCategory.MONITORING, "org.apache.openejb.monitoring")
                 .info("instance.created", invocationContext.getTarget().getClass().getName(),
end - start);
     }
 
@@ -126,7 +126,7 @@ public class StatsInterceptor {
         record(invocationContext, PreDestroy());
         long end = System.nanoTime();
         org.apache.openejb.util.Logger
-                .getInstance(LogCategory.OPENEJB, "org.apache.openejb.util.resources")
+                .getInstance(LogCategory.MONITORING, "org.apache.openejb.monitoring")
                 .info("instance.discarded", invocationContext.getTarget().getClass().getName(),
end - start);
     }
 

http://git-wip-us.apache.org/repos/asf/tomee/blob/07fe3500/container/openejb-core/src/main/java/org/apache/openejb/util/LogCategory.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/main/java/org/apache/openejb/util/LogCategory.java
b/container/openejb-core/src/main/java/org/apache/openejb/util/LogCategory.java
index 49b3ffd..3a4790e 100644
--- a/container/openejb-core/src/main/java/org/apache/openejb/util/LogCategory.java
+++ b/container/openejb-core/src/main/java/org/apache/openejb/util/LogCategory.java
@@ -59,6 +59,7 @@ public final class LogCategory {
     public static final LogCategory HTTPSERVER = OPENEJB_SERVER.createChild("http");
     public static final LogCategory SERVICEPOOL = OPENEJB_SERVER.createChild("pool");
     public static final LogCategory OPENEJB_SQL = OPENEJB.createChild("sql");
+    public static final LogCategory MONITORING = OPENEJB.createChild("monitoring");
 
     private LogCategory(final String name) {
         this.name = name;

http://git-wip-us.apache.org/repos/asf/tomee/blob/07fe3500/container/openejb-core/src/main/resources/org/apache/openejb/monitoring/Messages.properties
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/main/resources/org/apache/openejb/monitoring/Messages.properties
b/container/openejb-core/src/main/resources/org/apache/openejb/monitoring/Messages.properties
new file mode 100644
index 0000000..5d070b7
--- /dev/null
+++ b/container/openejb-core/src/main/resources/org/apache/openejb/monitoring/Messages.properties
@@ -0,0 +1,18 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+instance.created=Instance created: {0} {1}ns
+instance.discarded=Instance discarded: {0} {1}ns
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tomee/blob/07fe3500/container/openejb-core/src/main/resources/org/apache/openejb/util/resources/Messages.properties
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/main/resources/org/apache/openejb/util/resources/Messages.properties
b/container/openejb-core/src/main/resources/org/apache/openejb/util/resources/Messages.properties
index 3284ce2..8a985b6 100644
--- a/container/openejb-core/src/main/resources/org/apache/openejb/util/resources/Messages.properties
+++ b/container/openejb-core/src/main/resources/org/apache/openejb/util/resources/Messages.properties
@@ -262,9 +262,6 @@ deploy.c.061=Deploy option -c.  Could not copy jar {0} to {1}. Jar already
exist
 
 entityEjbHomeHandler.containerInvocationFailure=Failure at container invocation: {0}
 
-instance.created=Instance created: {0} {1}ns
-instance.discarded=Instance discarded: {0} {1}ns
-
 # ConfigurationFactory
 # DeploymentLoader.logger.info("validationDisabled");
 validationDisabled = Validation is disabled (enable it with the \"{0}\" boolean property)


Mime
View raw message