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

Brock Noland edited comment on FLUME-1427 at 10/17/12 7:37 PM:
---------------------------------------------------------------

I assume this is still relevant? It looks like that code has changed a litte.

{code}
    if(!isBadEvent){
      pri = Integer.parseInt(prio.toString());
      sev = pri % 8;
      facility = pri / 8;
      formatHeaders();
    }
{code}
                
      was (Author: brocknoland):
    I assume this is still relevant? It looks like that code has changed a 
litte.

    if(!isBadEvent){
      pri = Integer.parseInt(prio.toString());
      sev = pri % 8;
      facility = pri / 8;
      formatHeaders();
    }
                  
> 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
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to