Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generated RFC 3164 messages are not fine #20

Open
graiSoft1982 opened this issue Dec 20, 2017 · 2 comments
Open

Generated RFC 3164 messages are not fine #20

graiSoft1982 opened this issue Dec 20, 2017 · 2 comments

Comments

@graiSoft1982
Copy link

graiSoft1982 commented Dec 20, 2017

Hello. The generated Message Sender:

UdpSyslogMessageSender messageSender = new UdpSyslogMessageSender();
messageSender.setDefaultMessageHostname("myhostname"); // some syslog cloud services may use this field to transmit a secret key
messageSender.setDefaultAppName("wz-"+ tag);
messageSender.setDefaultFacility(Facility.AUDIT);
messageSender.setDefaultSeverity(Severity.ERROR);
messageSender.setSyslogServerHostname("192.168.88.2");
messageSender.setSyslogServerPort(514);
messageSender.setMessageFormat(MessageFormat.RFC_3164); // optional, default is RFC 3164

send incorrect information to log szerver:
Time: Dec 20 12:35:23
IP: 192.168.88.236
Host: myhostname
Facility: mail
Priority: emerg
Tag: wz-StreamingShaderActivity
Message: HELLO Fomr Issues

I check te network traffic with Wireshark and the syslo-java-client generate an incorrect message.

image

0000 dc fe 07 2d 4f 21 a4 e4 b8 b0 61 0b 08 00 45 00 ...-O!....a...E.
0010 00 67 2e b2 40 00 40 11 d9 94 c0 a8 58 ec c0 a8 .g..@.@.....X...
0020 58 02 91 99 02 02 00 53 69 43 3c 31 36 3e 44 65 X......SiC<16>De
0030 63 20 32 30 20 31 32 3a 34 30 3a 33 39 20 6d 79 c 20 12:40:39 my
0040 68 6f 73 74 6e 61 6d 65 20 77 7a 2d 53 74 72 65 hostname wz-Stre
0050 61 6d 69 6e 67 53 68 61 64 65 72 41 63 74 69 76 amingShaderActiv
0060 69 74 79 3a 20 48 45 4c 4c 4f 20 46 6f 6d 72 20 ity: HELLO Fomr
0070 57 6f 77 7a 61 Wowza

@cyrille-leclerc
Copy link
Contributor

Hello @granoviter, can you please describe the nature of the problem? Could it be related to @asaf-romano 's #18?

@graiSoft1982
Copy link
Author

I, just integrate your prebuilt jar file into my android studio project (last versios) and i probe use that with your sample code.

I send log with :
messageSender.setDefaultFacility(Facility.AUDIT);
messageSender.setDefaultSeverity(Severity.ERROR);
parameter but the syslog server receive :
image

The syslog server work correctly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants