garydgregory commented on a change in pull request #683:
URL: https://github.com/apache/logging-log4j2/pull/683#discussion_r785986466



##########
File path: 
log4j-core/src/main/java/org/apache/logging/log4j/core/appender/SyslogAppender.java
##########
@@ -300,6 +307,11 @@ public B setLoggerFields(final LoggerFields[] 
loggerFields) {
             this.loggerFields = loggerFields;
             return asBuilder();
         }
+
+               public B setTimestampPrecision(final String timestampPrecision) 
{

Review comment:
       This indentation looks messed up. Spaces, no tabs, could be the issue?

##########
File path: 
log4j-core/src/main/java/org/apache/logging/log4j/core/layout/Rfc5424Layout.java
##########
@@ -270,7 +278,7 @@ private static PatternParser createPatternParser(final 
Configuration config,
     public String toSerializable(final LogEvent event) {
         final StringBuilder buf = getStringBuilder();
         appendPriority(buf, event.getLevel());
-        appendTimestamp(buf, event.getTimeMillis());
+               appendTimestamp(buf, event.getInstant());

Review comment:
       No tabs.

##########
File path: 
log4j-core/src/main/java/org/apache/logging/log4j/core/appender/SyslogAppender.java
##########
@@ -425,6 +440,7 @@ protected SyslogAppender(final String name, final Layout<? 
extends Serializable>
                 .setCharsetName(charset)
                 .setExceptionPattern(exceptionPattern)
                 .setLoggerFields(loggerFields)
+                .setTimestampPrecision( timestampPrecision )

Review comment:
       No spaces around an argument, please follow the style of the file you're 
in!
   `.setTimestampPrecision( timestampPrecision )` -> 
`.setTimestampPrecision(timestampPrecision)`

##########
File path: 
log4j-core/src/main/java/org/apache/logging/log4j/core/appender/SyslogAppender.java
##########
@@ -211,6 +214,10 @@ public String getExceptionPattern() {
             return loggerFields;
         }
 
+               public String getTimestampPrecision() {

Review comment:
       This indentation looks messed up. Spaces, no tabs, could be the issue?

##########
File path: 
log4j-core/src/main/java/org/apache/logging/log4j/core/appender/SyslogAppender.java
##########
@@ -104,6 +104,9 @@
         @PluginElement("LoggerFields")
         private LoggerFields[] loggerFields;
 
+        @PluginBuilderAttribute( "timestampPrecision" )
+        private String timestampPrecision;

Review comment:
       Shouldn't we use an enum here?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to