Last active
March 17, 2023 19:32
-
-
Save denisdemaisbr/9ea4ae163240e9ea61e6a73a273bc301 to your computer and use it in GitHub Desktop.
sample usage of syslog using syslog4j tested with java 1.8 (openjdk version "1.8.0_362")
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# download package from http://syslog4j.org/ | |
# check also https://manpages.ubuntu.com/manpages/xenial/man1/logger.1.html | |
# | |
java -cp syslog4j-0.9.46-bin.jar \ | |
org.productivity.java.syslog4j.server.SyslogServerMain \ | |
-h 127.0.0.1 \ | |
-p 9999 \ | |
udp \ | |
"hello world" | |
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# free firewall port udp/9999 =) | |
# download package from http://syslog4j.org/ | |
# | |
java -cp syslog4j-0.9.46-bin.jar \ | |
org.productivity.java.syslog4j.server.SyslogServerMain \ | |
-h 0.0.0.0 \ | |
-p 9999 \ | |
-t 5000 \ | |
syslog.txt tcp | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment