summaryrefslogtreecommitdiffstats
path: root/sandbox/slaws/logging-copy/src/main/java/pathb
diff options
context:
space:
mode:
Diffstat (limited to 'sandbox/slaws/logging-copy/src/main/java/pathb')
-rw-r--r--sandbox/slaws/logging-copy/src/main/java/pathb/SomeTuscanyClassB.java48
-rw-r--r--sandbox/slaws/logging-copy/src/main/java/pathb/tuscany-messages_en.properties24
2 files changed, 72 insertions, 0 deletions
diff --git a/sandbox/slaws/logging-copy/src/main/java/pathb/SomeTuscanyClassB.java b/sandbox/slaws/logging-copy/src/main/java/pathb/SomeTuscanyClassB.java
new file mode 100644
index 0000000000..5ad190d9c4
--- /dev/null
+++ b/sandbox/slaws/logging-copy/src/main/java/pathb/SomeTuscanyClassB.java
@@ -0,0 +1,48 @@
+package pathb;
+
+import java.io.InputStream;
+import java.util.logging.Level;
+import java.util.logging.LogManager;
+import java.util.logging.Logger;
+
+import org.apache.cxf.common.logging.LogUtils;
+
+import patha.SomeTuscanyClassA;
+
+public class SomeTuscanyClassB {
+ private static final Logger Log = Logger.getLogger(SomeTuscanyClassA.class.getName());
+
+
+ public SomeTuscanyClassB() {
+
+ Logger Log1 = Logger.getLogger("pathb", "tuscany-messages");
+ Logger Log = Logger.getLogger(SomeTuscanyClassB.class.getName());
+ String rbName = Log.getResourceBundleName();
+
+ Log.log(Level.INFO,
+ "MESSAGE1");
+
+
+ String componentName = "Some component";
+
+ Log.log(Level.INFO,
+ "MESSAGE2", // message id
+ componentName); // parameter
+
+ Integer params[] = {8, 9, 4};
+
+ Log.log(Level.INFO,
+ "MESSAGE3", // message id
+ params); // parameter
+
+
+ Exception ex = new IllegalStateException("TEST_MESSAGE");
+
+ Log.log(Level.INFO,
+ "MESSAGE4", // message id
+ ex); // parameter
+
+
+ }
+
+}
diff --git a/sandbox/slaws/logging-copy/src/main/java/pathb/tuscany-messages_en.properties b/sandbox/slaws/logging-copy/src/main/java/pathb/tuscany-messages_en.properties
new file mode 100644
index 0000000000..523263da40
--- /dev/null
+++ b/sandbox/slaws/logging-copy/src/main/java/pathb/tuscany-messages_en.properties
@@ -0,0 +1,24 @@
+#
+#
+# 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.
+#
+#
+MESSAGE1 = This is a test message with no params
+MESSAGE2 = This is a test message with a string param {0}
+MESSAGE3 = This is a test message with numbers {0}, {1}, {2}
+MESSAGE4 = This is a test message with exception