[ 
https://issues.apache.org/jira/browse/FLUME-1427?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13432084#comment-13432084
 ] 

Mike Percy commented on FLUME-1427:
-----------------------------------

Oops, apologies Bhaskar, I just submitted a similar patch over in FLUME-1470. I 
had missed this JIRA previously.

Some review feedback:
* The unit tests will fail if this patch is applied directly. If you correct 
the unit tests and update your patch then I would be happy to get it committed. 
It's a best practice to run "mvn clean install" and allow all unit tests to 
complete before submitting your patch.
* Nit: The integer calculation for facility can be reduced to (priority / 8). 
No subtraction necessary.

On the patch naming thing, I agree with Patrick, it's a best practice... JIRA 
was being problematic last night when I created the patch in FLUME-1470 and 
didn't bother renaming it once JIRA was back up and I was able to file a ticket 
:)

Regards,
Mike

                
> Syslog Facility calculation is wrong
> ------------------------------------
>
>                 Key: FLUME-1427
>                 URL: https://issues.apache.org/jira/browse/FLUME-1427
>             Project: Flume
>          Issue Type: Bug
>          Components: Sinks+Sources
>    Affects Versions: v1.2.0, v1.3.0
>            Reporter: Bhaskar Karambelkar
>              Labels: syslog
>             Fix For: v1.2.0, v1.3.0
>
>         Attachments: syslog.patch
>
>
> As per Syslog RFC, priority = (facility * 8) + severity, given this logic, 
> the code to calculate facility and severity from priority should be
> severity = priority % 8 ;
> facility = (priority - severity) / 8 ;
> But in SyslogUtils's buildEvent method
> facility = priority - severity
> i.e. the / 8 is missing.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to