Author: jacopoc
Date: Fri Aug 8 13:16:46 2014 New Revision: 1616744 URL: http://svn.apache.org/r1616744 Log: Misc minor cleanups to log messages. Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/BshUtil.java ofbiz/trunk/framework/base/src/org/ofbiz/base/util/collections/MapStack.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/jdbc/DatabaseUtil.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelReader.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/transaction/TransactionUtil.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/util/EntityListIterator.java ofbiz/trunk/framework/service/src/org/ofbiz/service/ModelServiceReader.java ofbiz/trunk/framework/service/src/org/ofbiz/service/ServiceContainer.java ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/ControlServlet.java ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/taglib/ContentUrlTag.java ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlFormWrapper.java Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/BshUtil.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/BshUtil.java?rev=1616744&r1=1616743&r2=1616744&view=diff ============================================================================== --- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/BshUtil.java (original) +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/BshUtil.java Fri Aug 8 13:16:46 2014 @@ -160,10 +160,10 @@ public final class BshUtil { } catch (EvalError ee) { Throwable t = ee.getCause(); if (t == null) { - Debug.logWarning(ee, "WARNING: no cause (from getCause) found for BSH EvalError: " + ee.toString(), module); + Debug.logWarning(ee, "No cause (from getCause) found for BSH EvalError: " + ee.toString(), module); t = ee; } else { - Debug.logError(t, "ERROR: Got cause (from getCause) for BSH EvalError: " + ee.toString(), module); + Debug.logError(t, "Got cause (from getCause) for BSH EvalError: " + ee.toString(), module); } String errMsg = "Error running BSH script at [" + location + "], line [" + ee.getErrorLineNumber() + "]: " + t.toString(); Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/collections/MapStack.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/collections/MapStack.java?rev=1616744&r1=1616743&r2=1616744&view=diff ============================================================================== --- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/collections/MapStack.java (original) +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/collections/MapStack.java Fri Aug 8 13:16:46 2014 @@ -131,7 +131,7 @@ public class MapStack<K> extends MapCont public Object put(K key, Object value) { if ("context".equals(key)) { if (value == null || this != value) { - Debug.logWarning("WARNING: Putting a value in a MapStack with key [context] that is not this MapStack, will be hidden by the current MapStack self-reference: " + value, module); + Debug.logWarning("Putting a value in a MapStack with key [context] that is not this MapStack, will be hidden by the current MapStack self-reference: " + value, module); } } Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/jdbc/DatabaseUtil.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/jdbc/DatabaseUtil.java?rev=1616744&r1=1616743&r2=1616744&view=diff ============================================================================== --- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/jdbc/DatabaseUtil.java (original) +++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/jdbc/DatabaseUtil.java Fri Aug 8 13:16:46 2014 @@ -332,14 +332,14 @@ public class DatabaseUtil { // NOTE: this may need a toUpperCase in some cases, keep an eye on it, okay just compare with ignore case if (!ccInfo.typeName.equalsIgnoreCase(typeName)) { - String message = "WARNING: Column [" + ccInfo.columnName + "] of table [" + tableName + "] of entity [" + + String message = "Column [" + ccInfo.columnName + "] of table [" + tableName + "] of entity [" + entity.getEntityName() + "] is of type [" + ccInfo.typeName + "] in the database, but is defined as type [" + typeName + "] in the entity definition."; Debug.logError(message, module); if (messages != null) messages.add(message); } if (columnSize != -1 && ccInfo.columnSize != -1 && columnSize != ccInfo.columnSize && (columnSize * 3) != ccInfo.columnSize) { - String message = "WARNING: Column [" + ccInfo.columnName + "] of table [" + tableName + "] of entity [" + + String message = "Column [" + ccInfo.columnName + "] of table [" + tableName + "] of entity [" + entity.getEntityName() + "] has a column size of [" + ccInfo.columnSize + "] in the database, but is defined to have a column size of [" + columnSize + "] in the entity definition."; Debug.logWarning(message, module); @@ -350,7 +350,7 @@ public class DatabaseUtil { } } if (decimalDigits != -1 && decimalDigits != ccInfo.decimalDigits) { - String message = "WARNING: Column [" + ccInfo.columnName + "] of table [" + tableName + "] of entity [" + + String message = "Column [" + ccInfo.columnName + "] of table [" + tableName + "] of entity [" + entity.getEntityName() + "] has a decimalDigits of [" + ccInfo.decimalDigits + "] in the database, but is defined to have a decimalDigits of [" + decimalDigits + "] in the entity definition."; Debug.logWarning(message, module); @@ -359,13 +359,13 @@ public class DatabaseUtil { // do primary key matching check if (checkPks && ccInfo.isPk && !field.getIsPk()) { - String message = "WARNING: Column [" + ccInfo.columnName + "] of table [" + tableName + "] of entity [" + + String message = "Column [" + ccInfo.columnName + "] of table [" + tableName + "] of entity [" + entity.getEntityName() + "] IS a primary key in the database, but IS NOT a primary key in the entity definition. The primary key for this table needs to be re-created or modified so that this column is NOT part of the primary key."; Debug.logError(message, module); if (messages != null) messages.add(message); } if (checkPks && !ccInfo.isPk && field.getIsPk()) { - String message = "WARNING: Column [" + ccInfo.columnName + "] of table [" + tableName + "] of entity [" + + String message = "Column [" + ccInfo.columnName + "] of table [" + tableName + "] of entity [" + entity.getEntityName() + "] IS NOT a primary key in the database, but IS a primary key in the entity definition. The primary key for this table needs to be re-created or modified to add this column to the primary key. Note that data may need to be added first as a primary key column cannot have an null values."; Debug.logError(message, module); if (messages != null) messages.add(message); @@ -2631,13 +2631,13 @@ public class DatabaseUtil { /* ====================================================================== */ public int createDeclaredIndices(ModelEntity entity, List<String> messages) { if (entity == null) { - String message = "ERROR: ModelEntity was null and is required to create declared indices for a table"; + String message = "ModelEntity was null and is required to create declared indices for a table"; Debug.logError(message, module); if (messages != null) messages.add(message); return 0; } if (entity instanceof ModelViewEntity) { - String message = "WARNING: Cannot create declared indices for a view entity"; + String message = "Cannot create declared indices for a view entity"; Debug.logWarning(message, module); if (messages != null) messages.add(message); return 0; @@ -2842,13 +2842,13 @@ public class DatabaseUtil { public int createForeignKeyIndices(ModelEntity entity, int constraintNameClipLength, List<String> messages) { if (entity == null) { - String message = "ERROR: ModelEntity was null and is required to create foreign keys indices for a table"; + String message = "ModelEntity was null and is required to create foreign keys indices for a table"; Debug.logError(message, module); if (messages != null) messages.add(message); return 0; } if (entity instanceof ModelViewEntity) { - String message = "WARNING: Cannot create foreign keys indices for a view entity"; + String message = "Cannot create foreign keys indices for a view entity"; Debug.logWarning(message, module); if (messages != null) messages.add(message); return 0; Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelReader.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelReader.java?rev=1616744&r1=1616743&r2=1616744&view=diff ============================================================================== --- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelReader.java (original) +++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelReader.java Fri Aug 8 13:16:46 2014 @@ -140,10 +140,10 @@ public class ModelReader implements Seri // check to see if entity with same name has already been read if (entityCache.containsKey(entityName) && !redefinedEntity) { - Debug.logWarning("WARNING: Entity " + entityName + + Debug.logWarning("Entity " + entityName + " is defined more than once, most recent will over-write " + "previous definition(s)", module); - Debug.logWarning("WARNING: Entity " + entityName + " was found in " + + Debug.logWarning("Entity " + entityName + " was found in " + entityResourceHandler + ", but was already defined in " + entityResourceHandlerMap.get(entityName).toString(), module); } @@ -423,7 +423,7 @@ TEMP_VIEW_LOOP: for (String message : orderedMessages) { Debug.logInfo(message, module); } - Debug.logInfo("FINISHED LOADING ENTITIES - ALL FILES; #Entities=" + numEntities + " #ViewEntities=" + numViewEntities + " #Fields=" + numFields + " #Relationships=" + numRelations + " #AutoRelationships=" + numAutoRelations, module); + Debug.logInfo("Finished loading entities; #Entities=" + numEntities + " #ViewEntities=" + numViewEntities + " #Fields=" + numFields + " #Relationships=" + numRelations + " #AutoRelationships=" + numAutoRelations, module); } } } Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/transaction/TransactionUtil.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/transaction/TransactionUtil.java?rev=1616744&r1=1616743&r2=1616744&view=diff ============================================================================== --- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/transaction/TransactionUtil.java (original) +++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/transaction/TransactionUtil.java Fri Aug 8 13:16:46 2014 @@ -747,9 +747,9 @@ public class TransactionUtil implements private static void setTransactionBeginStack(Exception newExc) { if (transactionBeginStack.get() != null) { Exception e = transactionBeginStack.get(); - Debug.logWarning(e, "WARNING: In setTransactionBeginStack a stack placeholder was already in place, here is where the transaction began: ", module); + Debug.logWarning(e, "In setTransactionBeginStack a stack placeholder was already in place, here is where the transaction began: ", module); Exception e2 = new Exception("Current Stack Trace"); - Debug.logWarning(e2, "WARNING: In setTransactionBeginStack a stack placeholder was already in place, here is the current location: ", module); + Debug.logWarning(e2, "In setTransactionBeginStack a stack placeholder was already in place, here is the current location: ", module); } transactionBeginStack.set(newExc); Long curThreadId = Thread.currentThread().getId(); @@ -763,7 +763,7 @@ public class TransactionUtil implements Exception e = transactionBeginStack.get(); if (e == null) { Exception e2 = new Exception("Current Stack Trace"); - Debug.logWarning(e2, "WARNING: In clearTransactionBeginStack no stack placeholder was in place, here is the current location: ", module); + Debug.logWarning(e2, "In clearTransactionBeginStack no stack placeholder was in place, here is the current location: ", module); return null; } else { transactionBeginStack.set(null); @@ -775,7 +775,7 @@ public class TransactionUtil implements Exception e = transactionBeginStack.get(); if (e == null) { Exception e2 = new Exception("Current Stack Trace"); - Debug.logWarning(e2, "WARNING: In getTransactionBeginStack no stack placeholder was in place, here is the current location: ", module); + Debug.logWarning(e2, "In getTransactionBeginStack no stack placeholder was in place, here is the current location: ", module); } return e; } @@ -834,9 +834,9 @@ public class TransactionUtil implements private static void setSetRollbackOnlyCause(RollbackOnlyCause newRoc) { if (setRollbackOnlyCause.get() != null) { RollbackOnlyCause roc = setRollbackOnlyCause.get(); - roc.logError("WARNING: In setSetRollbackOnlyCause a stack placeholder was already in place, here is the original rollbackOnly cause: "); + roc.logError("In setSetRollbackOnlyCause a stack placeholder was already in place, here is the original rollbackOnly cause: "); Exception e2 = new Exception("Current Stack Trace"); - Debug.logWarning(e2, "WARNING: In setSetRollbackOnlyCause a stack placeholder was already in place, here is the current location: ", module); + Debug.logWarning(e2, "In setSetRollbackOnlyCause a stack placeholder was already in place, here is the current location: ", module); } setRollbackOnlyCause.set(newRoc); } @@ -859,7 +859,7 @@ public class TransactionUtil implements public static RollbackOnlyCause getSetRollbackOnlyCause() { if (setRollbackOnlyCause.get() == null) { Exception e = new Exception("Current Stack Trace"); - Debug.logWarning(e, "WARNING: In getSetRollbackOnlyCause no stack placeholder was in place, here is the current location: ", module); + Debug.logWarning(e, "In getSetRollbackOnlyCause no stack placeholder was in place, here is the current location: ", module); } return setRollbackOnlyCause.get(); } Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/util/EntityListIterator.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/util/EntityListIterator.java?rev=1616744&r1=1616743&r2=1616744&view=diff ============================================================================== --- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/util/EntityListIterator.java (original) +++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/util/EntityListIterator.java Fri Aug 8 13:16:46 2014 @@ -252,7 +252,7 @@ public class EntityListIterator implemen if (!haveShowHasNextWarning) { // DEJ20050207 To further discourage use of this, and to find existing use, always log a big warning showing where it is used: Exception whereAreWe = new Exception(); - Debug.logWarning(whereAreWe, "WARNING: For performance reasons do not use the EntityListIterator.hasNext() method, just call next() until it returns null; see JavaDoc comments in the EntityListIterator class for details and an example", module); + Debug.logWarning(whereAreWe, "For performance reasons do not use the EntityListIterator.hasNext() method, just call next() until it returns null; see JavaDoc comments in the EntityListIterator class for details and an example", module); haveShowHasNextWarning = true; } Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/ModelServiceReader.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/ModelServiceReader.java?rev=1616744&r1=1616743&r2=1616744&view=diff ============================================================================== --- ofbiz/trunk/framework/service/src/org/ofbiz/service/ModelServiceReader.java (original) +++ ofbiz/trunk/framework/service/src/org/ofbiz/service/ModelServiceReader.java Fri Aug 8 13:16:46 2014 @@ -145,7 +145,7 @@ public class ModelServiceReader implemen // check to see if service with same name has already been read if (modelServices.containsKey(serviceName)) { - Debug.logWarning("WARNING: Service " + serviceName + " is defined more than once, " + + Debug.logWarning("Service " + serviceName + " is defined more than once, " + "most recent will over-write previous definition(s)", module); } Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/ServiceContainer.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/ServiceContainer.java?rev=1616744&r1=1616743&r2=1616744&view=diff ============================================================================== --- ofbiz/trunk/framework/service/src/org/ofbiz/service/ServiceContainer.java (original) +++ ofbiz/trunk/framework/service/src/org/ofbiz/service/ServiceContainer.java Fri Aug 8 13:16:46 2014 @@ -90,7 +90,7 @@ public class ServiceContainer implements dispatcher = dispatcherFactory.createLocalDispatcher(dispatcherName, delegator); dispatcherCache.putIfAbsent(dispatcherName, dispatcher); dispatcher = dispatcherCache.get(dispatcherName); - if (Debug.infoOn()) Debug.logInfo("Created new dispatcher [" + dispatcherName + "] (" + Thread.currentThread().getName() + ")", module); + if (Debug.infoOn()) Debug.logInfo("Created new dispatcher [" + dispatcherName + "]", module); } return dispatcher; } Modified: ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/ControlServlet.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/ControlServlet.java?rev=1616744&r1=1616743&r2=1616744&view=diff ============================================================================== --- ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/ControlServlet.java (original) +++ ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/ControlServlet.java Fri Aug 8 13:16:46 2014 @@ -72,9 +72,7 @@ public class ControlServlet extends Http super.init(config); if (Debug.infoOn()) { ServletContext servletContext = config.getServletContext(); - Debug.logInfo("LOADING WEBAPP [" + servletContext.getContextPath().substring(1) + "] " - + servletContext.getServletContextName() - + ", located at " + servletContext.getRealPath("/"), module); + Debug.logInfo("Lading webapp [" + servletContext.getContextPath().substring(1) + "], located at " + servletContext.getRealPath("/"), module); } // configure custom BSF engines Modified: ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/taglib/ContentUrlTag.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/taglib/ContentUrlTag.java?rev=1616744&r1=1616743&r2=1616744&view=diff ============================================================================== --- ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/taglib/ContentUrlTag.java (original) +++ ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/taglib/ContentUrlTag.java Fri Aug 8 13:16:46 2014 @@ -59,7 +59,7 @@ public class ContentUrlTag extends BodyT public static void appendContentPrefix(HttpServletRequest request, Appendable urlBuffer) throws IOException { if (request == null) { - Debug.logWarning("WARNING: request was null in appendContentPrefix; this probably means this was used where it shouldn't be, like using ofbizContentUrl in a screen rendered through a service; using best-bet behavior: standard prefix from url.properties (no WebSite or security setting known)", module); + Debug.logWarning("Request was null in appendContentPrefix; this probably means this was used where it shouldn't be, like using ofbizContentUrl in a screen rendered through a service; using best-bet behavior: standard prefix from url.properties (no WebSite or security setting known)", module); String prefix = UtilProperties.getPropertyValue("url", "content.url.prefix.standard"); if (prefix != null) { urlBuffer.append(prefix.trim()); Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlFormWrapper.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlFormWrapper.java?rev=1616744&r1=1616743&r2=1616744&view=diff ============================================================================== --- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlFormWrapper.java (original) +++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlFormWrapper.java Fri Aug 8 13:16:46 2014 @@ -111,7 +111,7 @@ public class HtmlFormWrapper { if (contextStack instanceof MapStack) { return renderFormString((MapStack) contextStack); } else { - Debug.logWarning("WARNING: call renderFormString with a non-MapStack: " + (contextStack == null ? "null" : contextStack.getClass().getName()), module); + Debug.logWarning("Call renderFormString with a non-MapStack: " + (contextStack == null ? "null" : contextStack.getClass().getName()), module); return renderFormString(); } } |
Free forum by Nabble | Edit this page |