Repository: olingo-odata4
Updated Branches:
  refs/heads/olingo-266-ref e54aaac76 -> 2105b9bf4


[OLINGO-266] - optimze for log&trace


Project: http://git-wip-us.apache.org/repos/asf/olingo-odata4/repo
Commit: http://git-wip-us.apache.org/repos/asf/olingo-odata4/commit/2105b9bf
Tree: http://git-wip-us.apache.org/repos/asf/olingo-odata4/tree/2105b9bf
Diff: http://git-wip-us.apache.org/repos/asf/olingo-odata4/diff/2105b9bf

Branch: refs/heads/olingo-266-ref
Commit: 2105b9bf4d65c6d0d3736ec93ec6d287ada4f251
Parents: e54aaac
Author: Stephan Klevenz <[email protected]>
Authored: Fri May 2 14:35:32 2014 +0200
Committer: Stephan Klevenz <[email protected]>
Committed: Fri May 2 16:41:05 2014 +0200

----------------------------------------------------------------------
 .../src/test/resources/simplelogger.properties  | 19 +++++++++
 lib/ref/pom.xml                                 | 19 ++++++++-
 .../org/apache/olingo/ref/EdmTechProvider.java  | 16 +++++++
 .../olingo/ref/ReferenceScenarioServlet.java    |  9 ++++
 .../src/main/resources/simplelogger.properties  | 20 +++++++++
 .../olingo/ref/ReferenceScenarioTest.java       | 23 ++++++++++
 lib/server-core/pom.xml                         | 45 +++++++++++---------
 .../src/test/resources/simplelogger.properties  | 20 +++++++++
 8 files changed, 149 insertions(+), 22 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/2105b9bf/lib/commons-core/src/test/resources/simplelogger.properties
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/test/resources/simplelogger.properties 
b/lib/commons-core/src/test/resources/simplelogger.properties
new file mode 100644
index 0000000..fcde843
--- /dev/null
+++ b/lib/commons-core/src/test/resources/simplelogger.properties
@@ -0,0 +1,19 @@
+#
+# 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.
+#
+org.slf4j.simpleLogger.defaultLogLevel=debug

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/2105b9bf/lib/ref/pom.xml
----------------------------------------------------------------------
diff --git a/lib/ref/pom.xml b/lib/ref/pom.xml
index 4b85d1f..937b68c 100644
--- a/lib/ref/pom.xml
+++ b/lib/ref/pom.xml
@@ -57,10 +57,25 @@
       <artifactId>olingo-server-core</artifactId>
       <version>${project.version}</version>
     </dependency>
+    
+    <dependency>
+      <groupId>commons-logging</groupId>
+      <artifactId>commons-logging</artifactId>
+      <scope>runtime</scope>
+    </dependency>
     <dependency>
       <groupId>org.slf4j</groupId>
-      <artifactId>slf4j-log4j12</artifactId>
-      <version>${sl4j.version}</version> 
+      <artifactId>slf4j-simple</artifactId>
+      <scope>runtime</scope>
+    </dependency>
+    
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.mockito</groupId>
+      <artifactId>mockito-all</artifactId>
     </dependency>
   </dependencies>
 

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/2105b9bf/lib/ref/src/main/java/org/apache/olingo/ref/EdmTechProvider.java
----------------------------------------------------------------------
diff --git a/lib/ref/src/main/java/org/apache/olingo/ref/EdmTechProvider.java 
b/lib/ref/src/main/java/org/apache/olingo/ref/EdmTechProvider.java
index a819806..baf70f1 100644
--- a/lib/ref/src/main/java/org/apache/olingo/ref/EdmTechProvider.java
+++ b/lib/ref/src/main/java/org/apache/olingo/ref/EdmTechProvider.java
@@ -1991,6 +1991,22 @@ public class EdmTechProvider extends EdmProvider {
   @Override
   public List<Schema> getSchemas() throws ODataException {
     List<Schema> schemas = new ArrayList<Schema>();
+    
+    Schema schema = new Schema();
+    
+    schema.setNamespace(nameSpace);
+    schema.setActions(null);
+    schema.setAlias(null);
+    schema.setComplexTypes(null);
+    schema.setEntityContainer(getEntityContainer());
+    schema.setEntityTypes(null);
+    schema.setEnumTypes(null);
+    schema.setFunctions(null);
+    schema.setTerms(null);
+    schema.setTypeDefinitions(null);
+    
+//    schemas.add(schema);
+    
     return schemas;
   }
 

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/2105b9bf/lib/ref/src/main/java/org/apache/olingo/ref/ReferenceScenarioServlet.java
----------------------------------------------------------------------
diff --git 
a/lib/ref/src/main/java/org/apache/olingo/ref/ReferenceScenarioServlet.java 
b/lib/ref/src/main/java/org/apache/olingo/ref/ReferenceScenarioServlet.java
index d44e5bb..66f316d 100644
--- a/lib/ref/src/main/java/org/apache/olingo/ref/ReferenceScenarioServlet.java
+++ b/lib/ref/src/main/java/org/apache/olingo/ref/ReferenceScenarioServlet.java
@@ -20,9 +20,18 @@ package org.apache.olingo.ref;
 
 import org.apache.olingo.server.api.edm.provider.EdmProvider;
 import org.apache.olingo.server.core.servlet.ODataServlet;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class ReferenceScenarioServlet extends ODataServlet {
 
+  private static final Logger log = 
LoggerFactory.getLogger(ReferenceScenarioServlet.class);
+  
+  static {
+    log.info("============================== OLINGO REF SCEN LOADED 
=====================================");
+  }
+  
+  
   private static final long serialVersionUID = 1L;
 
   @Override

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/2105b9bf/lib/ref/src/main/resources/simplelogger.properties
----------------------------------------------------------------------
diff --git a/lib/ref/src/main/resources/simplelogger.properties 
b/lib/ref/src/main/resources/simplelogger.properties
new file mode 100644
index 0000000..2a3350c
--- /dev/null
+++ b/lib/ref/src/main/resources/simplelogger.properties
@@ -0,0 +1,20 @@
+#
+# 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.
+#
+org.slf4j.simpleLogger.defaultLogLevel=debug
+org.slf4j.simpleLogger.logFile=System.out
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/2105b9bf/lib/ref/src/test/java/org/apache/olingo/ref/ReferenceScenarioTest.java
----------------------------------------------------------------------
diff --git 
a/lib/ref/src/test/java/org/apache/olingo/ref/ReferenceScenarioTest.java 
b/lib/ref/src/test/java/org/apache/olingo/ref/ReferenceScenarioTest.java
new file mode 100644
index 0000000..603ed95
--- /dev/null
+++ b/lib/ref/src/test/java/org/apache/olingo/ref/ReferenceScenarioTest.java
@@ -0,0 +1,23 @@
+/*
+ * 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.
+ */
+package org.apache.olingo.ref;
+
+public class ReferenceScenarioTest {
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/2105b9bf/lib/server-core/pom.xml
----------------------------------------------------------------------
diff --git a/lib/server-core/pom.xml b/lib/server-core/pom.xml
index 28693fc..d04c5fc 100644
--- a/lib/server-core/pom.xml
+++ b/lib/server-core/pom.xml
@@ -1,26 +1,26 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
 
-    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
+  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
+  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.
+  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.
 
 -->
 <project xmlns="http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd";>
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd";>
   <modelVersion>4.0.0</modelVersion>
 
   <artifactId>olingo-server-core</artifactId>
@@ -45,7 +45,7 @@
       <artifactId>olingo-commons-core</artifactId>
       <version>${project.version}</version>
     </dependency>
-        <dependency>
+    <dependency>
       <groupId>javax.servlet</groupId>
       <artifactId>javax.servlet-api</artifactId>
       <version>${servlet.version}</version>
@@ -67,9 +67,14 @@
       <artifactId>jackson-core</artifactId>
     </dependency>
     <dependency>
+      <groupId>commons-logging</groupId>
+      <artifactId>commons-logging</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
       <groupId>org.slf4j</groupId>
-      <artifactId>slf4j-log4j12</artifactId>
-      <version>1.7.6</version>
+      <artifactId>slf4j-simple</artifactId>
+      <scope>test</scope>
     </dependency>
   </dependencies>
 
@@ -97,8 +102,8 @@
           <!--<arguments><argument>-atn</argument></arguments> -->
           <listener>true</listener>
           <visitor>true</visitor>
-          <!--maven antlr plugin has trouble with grammer import if the 
grammerfiles 
-          are not directly inside src/main/antlr4, hence we have to set the 
libDirectory -->
+          <!--maven antlr plugin has trouble with grammer import if the 
grammerfiles
+            are not directly inside src/main/antlr4, hence we have to set the 
libDirectory -->
           
<libDirectory>src/main/antlr4/org/apache/olingo/server/core/uri/antlr</libDirectory>
         </configuration>
       </plugin>

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/2105b9bf/lib/server-core/src/test/resources/simplelogger.properties
----------------------------------------------------------------------
diff --git a/lib/server-core/src/test/resources/simplelogger.properties 
b/lib/server-core/src/test/resources/simplelogger.properties
new file mode 100644
index 0000000..2a3350c
--- /dev/null
+++ b/lib/server-core/src/test/resources/simplelogger.properties
@@ -0,0 +1,20 @@
+#
+# 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.
+#
+org.slf4j.simpleLogger.defaultLogLevel=debug
+org.slf4j.simpleLogger.logFile=System.out
\ No newline at end of file

Reply via email to