File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -61,8 +61,8 @@ function parsePRI(raw) {
61
61
// PRI means Priority, includes Facility and Severity
62
62
// e.g. 10110111 = 10110: facility 111: severity
63
63
var binary = ( ~ ~ raw ) . toString ( 2 )
64
- var facility = parseInt ( binary . substr ( binary . length - 3 ) , 2 )
65
- var severity = parseInt ( binary . substring ( 0 , binary . length - 3 ) , 2 )
64
+ var severity = parseInt ( binary . substr ( binary . length - 3 ) , 2 )
65
+ var facility = parseInt ( binary . substring ( 0 , binary . length - 3 ) , 2 )
66
66
return [ facility , severity ]
67
67
}
68
68
Original file line number Diff line number Diff line change @@ -13,8 +13,8 @@ describe( "given a syslogd service", () => {
13
13
//console.log(info)
14
14
info . port = null // port is random
15
15
var shouldRet = {
16
- facility : 7
17
- , severity : 22
16
+ facility : 22
17
+ , severity : 7
18
18
, tag : 'tag'
19
19
, time : new Date ( time + ' ' + new Date ( ) . getFullYear ( ) )
20
20
, hostname : 'hostname'
Original file line number Diff line number Diff line change @@ -17,8 +17,8 @@ describe( "given a TCP Syslog Server", () => {
17
17
info . address = null
18
18
info . family = null
19
19
var shouldRet = {
20
- facility : 7
21
- , severity : 22
20
+ facility : 22
21
+ , severity : 7
22
22
, tag : 'tag'
23
23
, time : new Date ( time + ' ' + new Date ( ) . getFullYear ( ) )
24
24
, hostname : 'hostname'
You can’t perform that action at this time.
0 commit comments