usergrid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From snoopd...@apache.org
Subject [45/50] [abbrv] git commit: Minor logging changes.
Date Fri, 13 Jun 2014 18:54:24 GMT
Minor logging changes.


Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/3255b041
Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/3255b041
Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/3255b041

Branch: refs/heads/two-dot-o
Commit: 3255b04147eee771f472507721a05e5f9b166aa1
Parents: 67290f9
Author: Dave Johnson <dmjohnson@apigee.com>
Authored: Fri Jun 13 07:50:20 2014 -0400
Committer: Dave Johnson <dmjohnson@apigee.com>
Committed: Fri Jun 13 07:50:20 2014 -0400

----------------------------------------------------------------------
 .../usergrid/corepersistence/CpEntityManager.java    | 15 +++++++++++++++
 stack/core/src/test/resources/log4j.properties       |  6 ++++--
 .../queryindex/src/test/resources/log4j.properties   |  6 ++++--
 stack/services/src/test/resources/log4j.properties   |  8 +++++---
 4 files changed, 28 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3255b041/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityManager.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityManager.java
b/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityManager.java
index be56160..13b8244 100644
--- a/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityManager.java
+++ b/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityManager.java
@@ -1487,6 +1487,9 @@ public class CpEntityManager implements EntityManager {
         try {
             createRole( "admin", "Administrator", 0 );
         }
+        catch ( DuplicateUniquePropertyExistsException dupe ) {
+            logger.warn("Role admin already exists ");
+        }
         catch ( Exception e ) {
             logger.error( "Could not create admin role, may already exist", e );
         }
@@ -1494,6 +1497,9 @@ public class CpEntityManager implements EntityManager {
         try {
             createRole( "default", "Default", 0 );
         }
+        catch ( DuplicateUniquePropertyExistsException dupe ) {
+            logger.warn("Role default already exists ");
+        }
         catch ( Exception e ) {
             logger.error( "Could not create default role, may already exist", e );
         }
@@ -1501,6 +1507,9 @@ public class CpEntityManager implements EntityManager {
         try {
             createRole( "guest", "Guest", 0 );
         }
+        catch ( DuplicateUniquePropertyExistsException dupe ) {
+            logger.warn("Role guest already exists ");
+        }
         catch ( Exception e ) {
             logger.error( "Could not create guest role, may already exist", e );
         }
@@ -1508,6 +1517,9 @@ public class CpEntityManager implements EntityManager {
         try {
             grantRolePermissions( "default", Arrays.asList( "get,put,post,delete:/**" ) );
         }
+        catch ( DuplicateUniquePropertyExistsException dupe ) {
+            logger.warn("Role default already has permission");
+        }
         catch ( Exception e ) {
             logger.error( "Could not populate default role", e );
         }
@@ -1516,6 +1528,9 @@ public class CpEntityManager implements EntityManager {
             grantRolePermissions( "guest", 
                     Arrays.asList( "post:/users", "post:/devices", "put:/devices/*" ) );
         }
+        catch ( DuplicateUniquePropertyExistsException dupe ) {
+            logger.warn("Role guest already has permission");
+        }
         catch ( Exception e ) {
             logger.error( "Could not populate guest role", e );
         }

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3255b041/stack/core/src/test/resources/log4j.properties
----------------------------------------------------------------------
diff --git a/stack/core/src/test/resources/log4j.properties b/stack/core/src/test/resources/log4j.properties
index aa3f1fe..d6c89f9 100644
--- a/stack/core/src/test/resources/log4j.properties
+++ b/stack/core/src/test/resources/log4j.properties
@@ -26,6 +26,8 @@ log4j.appender.stdout=org.apache.log4j.ConsoleAppender
 log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
 log4j.appender.stdout.layout.ConversionPattern=%d %p (%t) %c{1} - %m%n
 
+log4j.logger.org.apache.usergrid=INFO
+
 #log4j.logger.org.apache.usergrid.persistence.cassandra.DB=WARN, stdout
 #log4j.logger.org.apache.usergrid.persistence.cassandra.BATCH=WARN, stdout
 #log4j.logger.org.apache.usergrid.persistence.cassandra.EntityManagerFactoryImpl=WARN, stdout
@@ -38,12 +40,12 @@ log4j.appender.stdout.layout.ConversionPattern=%d %p (%t) %c{1} - %m%n
 #log4j.logger.org.apache.usergrid.locking.singlenode.SingleNodeLockManagerImpl=DEBUG, stdout
 
 #log4j.logger.org.apache.usergrid.persistence=INFO
-log4j.logger.org.apache.usergrid.corepersistence=DEBUG
+#log4j.logger.org.apache.usergrid.corepersistence=DEBUG
 #log4j.logger.com.netflix.hystrix=DEBUG
 #log4j.logger.org.antlr=DEBUG
 
 #log4j.logger.org.apache.usergrid.persistence.CollectionIT=DEBUG
-log4j.logger.org.apache.usergrid.persistence.index=DEBUG
+#log4j.logger.org.apache.usergrid.persistence.index=DEBUG
 #log4j.logger.org.apache.usergrid.persistence.collection=DEBUG
 #log4j.logger.org.elasticsearch=DEBUG
 

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3255b041/stack/corepersistence/queryindex/src/test/resources/log4j.properties
----------------------------------------------------------------------
diff --git a/stack/corepersistence/queryindex/src/test/resources/log4j.properties b/stack/corepersistence/queryindex/src/test/resources/log4j.properties
index 1b5bf61..9b1f8de 100644
--- a/stack/corepersistence/queryindex/src/test/resources/log4j.properties
+++ b/stack/corepersistence/queryindex/src/test/resources/log4j.properties
@@ -26,8 +26,10 @@ log4j.appender.stdout=org.apache.log4j.ConsoleAppender
 log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
 log4j.appender.stdout.layout.ConversionPattern=%d %p (%t) %c{1} - %m%n
 
+log4j.logger.org.apache.usergrid=INFO
+
 #log4j.logger.org.apache.usergrid.persistence.CollectionIT=DEBUG
-log4j.logger.org.apache.usergrid.persistence.collection=WARN
-log4j.logger.org.apache.usergrid.persistence.index=DEBUG
+#log4j.logger.org.apache.usergrid.persistence.collection=WARN
+#log4j.logger.org.apache.usergrid.persistence.index=DEBUG
 
 #log4j.logger.org.apache.cassandra.service.StorageProxy=DEBUG, stdout
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3255b041/stack/services/src/test/resources/log4j.properties
----------------------------------------------------------------------
diff --git a/stack/services/src/test/resources/log4j.properties b/stack/services/src/test/resources/log4j.properties
index 394ac5c..9e6e040 100644
--- a/stack/services/src/test/resources/log4j.properties
+++ b/stack/services/src/test/resources/log4j.properties
@@ -26,6 +26,8 @@ log4j.appender.stdout=org.apache.log4j.ConsoleAppender
 log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
 log4j.appender.stdout.layout.ConversionPattern=%d %p (%t) %c{1} - %m%n
 
+log4j.logger.org.apache.usergrid=INFO
+
 #log4j.logger.org.apache.usergrid.persistence.cassandra.DB=WARN, stdout
 #log4j.logger.org.apache.usergrid.persistence.cassandra.BATCH=WARN, stdout
 #log4j.logger.org.apache.usergrid.persistence.cassandra.EntityManagerFactoryImpl=WARN, stdout
@@ -40,14 +42,14 @@ log4j.appender.stdout.layout.ConversionPattern=%d %p (%t) %c{1} - %m%n
 #log4j.logger.org.apache.usergrid.persistence=INFO
 #log4j.logger.org.apache.usergrid.corepersistence=DEBUG
 #log4j.logger.org.apache.usergrid.corepersistence.CpEntityManager=DEBUG
-log4j.logger.org.apache.usergrid.corepersistence.CpRelationManager=DEBUG
+#log4j.logger.org.apache.usergrid.corepersistence.CpRelationManager=DEBUG
 #log4j.logger.com.netflix.hystrix=DEBUG
 #log4j.logger.org.antlr=DEBUG
 
-log4j.logger.org.apache.usergrid.management.cassandra=DEBUG
+#log4j.logger.org.apache.usergrid.management.cassandra=DEBUG
 
 #log4j.logger.org.apache.usergrid.persistence.CollectionIT=DEBUG
-log4j.logger.org.apache.usergrid.persistence.index=DEBUG
+#log4j.logger.org.apache.usergrid.persistence.index=DEBUG
 #log4j.logger.org.apache.usergrid.persistence.collection=DEBUG
 #log4j.logger.org.elasticsearch=DEBUG
 


Mime
View raw message