Review Board 1.7.22


FLUME-1666 Syslog source strips timestamp and hostname from log message body

Review Request #14439 - Created Oct. 2, 2013 and updated

Jeff jlord
Reviewers
Flume
flume-git
Attaching a patch which introduces a boolean keepFields which defaults to false. When set to true this will preserve the timestamp and hostname in the body of the event. Additionally I have added a test for SyslogTcpSource

 
flume-ng-core/src/main/java/org/apache/flume/source/SyslogSourceConfigurationConstants.java
Revision 5a73c88 New Change
[20] 63 lines
[+20]
64
  public static final String DEFAULT_PORT_HEADER = "port";
64
  public static final String DEFAULT_PORT_HEADER = "port";
65

    
   
65

   
66
  public static final String CONFIG_READBUF_SIZE = "readBufferBytes";
66
  public static final String CONFIG_READBUF_SIZE = "readBufferBytes";
67
  public static final int DEFAULT_READBUF_SIZE = 1024;
67
  public static final int DEFAULT_READBUF_SIZE = 1024;
68

    
   
68

   

    
   
69
  public static final String CONFIG_KEEP_FIELDS = "keepFields";

    
   
70
  public static final boolean DEFAULT_KEEP_FIELDS = false;

    
   
71

   
69
  private SyslogSourceConfigurationConstants() {
72
  private SyslogSourceConfigurationConstants() {
70
    // Disable explicit creation of objects.
73
    // Disable explicit creation of objects.
71
  }
74
  }
72

    
   
75

   
73
}
76
}
flume-ng-core/src/main/java/org/apache/flume/source/SyslogTcpSource.java
Revision db9e0fd New Change
 
flume-ng-core/src/main/java/org/apache/flume/source/SyslogUtils.java
Revision c2a29a1 New Change
 
flume-ng-core/src/test/java/org/apache/flume/source/TestSyslogTcpSource.java
New File
 
flume-ng-core/src/test/java/org/apache/flume/source/TestSyslogUdpSource.java
Revision 2d7a429 New Change
 
flume-ng-core/src/test/java/org/apache/flume/source/TestSyslogUtils.java
Revision 7208464 New Change
 
flume-ng-doc/sphinx/FlumeDeveloperGuide.rst
Revision 2be9c68 New Change
 
flume-ng-doc/sphinx/FlumeUserGuide.rst
Revision dac3ce7 New Change
 
  1. flume-ng-core/src/main/java/org/apache/flume/source/SyslogSourceConfigurationConstants.java: Loading...
  2. flume-ng-core/src/main/java/org/apache/flume/source/SyslogTcpSource.java: Loading...
  3. flume-ng-core/src/main/java/org/apache/flume/source/SyslogUtils.java: Loading...
  4. flume-ng-core/src/test/java/org/apache/flume/source/TestSyslogTcpSource.java: Loading...
  5. flume-ng-core/src/test/java/org/apache/flume/source/TestSyslogUdpSource.java: Loading...
  6. flume-ng-core/src/test/java/org/apache/flume/source/TestSyslogUtils.java: Loading...
  7. flume-ng-doc/sphinx/FlumeDeveloperGuide.rst: Loading...
  8. flume-ng-doc/sphinx/FlumeUserGuide.rst: Loading...