This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-logging.git


The following commit(s) were added to refs/heads/master by this push:
     new f674d82  Fix formatting
f674d82 is described below

commit f674d8229e7d03d0e35892f59e9259b4d0569db4
Author: Gary Gregory <garydgreg...@gmail.com>
AuthorDate: Tue Aug 22 10:14:54 2023 -0400

    Fix formatting
---
 .../org/apache/commons/logging/LogFactory.java     |  2 +-
 .../logging/impl/Jdk13LumberjackLogger.java        |  6 ++---
 .../org/apache/commons/logging/impl/SimpleLog.java | 30 +++++++++++-----------
 3 files changed, 19 insertions(+), 19 deletions(-)

diff --git a/src/main/java/org/apache/commons/logging/LogFactory.java 
b/src/main/java/org/apache/commons/logging/LogFactory.java
index 791691f..7f8fdef 100644
--- a/src/main/java/org/apache/commons/logging/LogFactory.java
+++ b/src/main/java/org/apache/commons/logging/LogFactory.java
@@ -526,7 +526,7 @@ public abstract class LogFactory {
             try {
                 final InputStream is = getResourceAsStream(contextClassLoader, 
SERVICE_ID);
 
-                if( is != null ) {
+                if ( is != null ) {
                     // This code is needed by EBCDIC and other strange systems.
                     // It's a fix for bugs reported in xerces
                     BufferedReader rd;
diff --git 
a/src/main/java/org/apache/commons/logging/impl/Jdk13LumberjackLogger.java 
b/src/main/java/org/apache/commons/logging/impl/Jdk13LumberjackLogger.java
index 04f98c7..3da9011 100644
--- a/src/main/java/org/apache/commons/logging/impl/Jdk13LumberjackLogger.java
+++ b/src/main/java/org/apache/commons/logging/impl/Jdk13LumberjackLogger.java
@@ -73,14 +73,14 @@ public class Jdk13LumberjackLogger implements Log, 
Serializable {
     // --------------------------------------------------------- Public Methods
 
     private void log( final Level level, final String msg, final Throwable ex 
) {
-        if( getLogger().isLoggable(level) ) {
+        if ( getLogger().isLoggable(level) ) {
             final LogRecord record = new LogRecord(level, msg);
-            if( !classAndMethodFound ) {
+            if ( !classAndMethodFound ) {
                 getClassAndMethod();
             }
             record.setSourceClassName(sourceClassName);
             record.setSourceMethodName(sourceMethodName);
-            if( ex != null ) {
+            if ( ex != null ) {
                 record.setThrown(ex);
             }
             getLogger().log(record);
diff --git a/src/main/java/org/apache/commons/logging/impl/SimpleLog.java 
b/src/main/java/org/apache/commons/logging/impl/SimpleLog.java
index 18a1220..da9dd28 100644
--- a/src/main/java/org/apache/commons/logging/impl/SimpleLog.java
+++ b/src/main/java/org/apache/commons/logging/impl/SimpleLog.java
@@ -177,7 +177,7 @@ public class SimpleLog implements Log, Serializable {
         showShortName = getBooleanProperty(systemPrefix + "showShortLogname", 
showShortName);
         showDateTime = getBooleanProperty(systemPrefix + "showdatetime", 
showDateTime);
 
-        if(showDateTime) {
+        if (showDateTime) {
             dateTimeFormat = getStringProperty(systemPrefix + "dateTimeFormat",
                                                dateTimeFormat);
             try {
@@ -223,25 +223,25 @@ public class SimpleLog implements Log, Serializable {
             i = String.valueOf(name).lastIndexOf(".");
         }
 
-        if(null == lvl) {
+        if (null == lvl) {
             lvl =  getStringProperty(systemPrefix + "defaultlog");
         }
 
-        if("all".equalsIgnoreCase(lvl)) {
+        if ("all".equalsIgnoreCase(lvl)) {
             setLevel(SimpleLog.LOG_LEVEL_ALL);
-        } else if("trace".equalsIgnoreCase(lvl)) {
+        } else if ("trace".equalsIgnoreCase(lvl)) {
             setLevel(SimpleLog.LOG_LEVEL_TRACE);
-        } else if("debug".equalsIgnoreCase(lvl)) {
+        } else if ("debug".equalsIgnoreCase(lvl)) {
             setLevel(SimpleLog.LOG_LEVEL_DEBUG);
-        } else if("info".equalsIgnoreCase(lvl)) {
+        } else if ("info".equalsIgnoreCase(lvl)) {
             setLevel(SimpleLog.LOG_LEVEL_INFO);
-        } else if("warn".equalsIgnoreCase(lvl)) {
+        } else if ("warn".equalsIgnoreCase(lvl)) {
             setLevel(SimpleLog.LOG_LEVEL_WARN);
-        } else if("error".equalsIgnoreCase(lvl)) {
+        } else if ("error".equalsIgnoreCase(lvl)) {
             setLevel(SimpleLog.LOG_LEVEL_ERROR);
-        } else if("fatal".equalsIgnoreCase(lvl)) {
+        } else if ("fatal".equalsIgnoreCase(lvl)) {
             setLevel(SimpleLog.LOG_LEVEL_FATAL);
-        } else if("off".equalsIgnoreCase(lvl)) {
+        } else if ("off".equalsIgnoreCase(lvl)) {
             setLevel(SimpleLog.LOG_LEVEL_OFF);
         }
     }
@@ -281,7 +281,7 @@ public class SimpleLog implements Log, Serializable {
         final StringBuilder buf = new StringBuilder();
 
         // Append date-time if so configured
-        if(showDateTime) {
+        if (showDateTime) {
             final Date now = new Date();
             String dateText;
             synchronized(dateFormatter) {
@@ -302,14 +302,14 @@ public class SimpleLog implements Log, Serializable {
         }
 
         // Append the name of the log instance if so configured
-        if(showShortName) {
-            if(shortLogName == null) {
+        if (showShortName) {
+            if (shortLogName == null) {
                 // Cut all but the last component of the name for both styles
                 final String slName = 
logName.substring(logName.lastIndexOf(".") + 1);
                 shortLogName = slName.substring(slName.lastIndexOf("/") + 1);
             }
             buf.append(String.valueOf(shortLogName)).append(" - ");
-        } else if(showLogName) {
+        } else if (showLogName) {
             buf.append(String.valueOf(logName)).append(" - ");
         }
 
@@ -317,7 +317,7 @@ public class SimpleLog implements Log, Serializable {
         buf.append(String.valueOf(message));
 
         // Append stack trace if not null
-        if(t != null) {
+        if (t != null) {
             buf.append(" <");
             buf.append(t.toString());
             buf.append(">");

Reply via email to