Skip to content

Commit 4bbe435

Browse files
simple syslog receiver
1 parent cc9589d commit 4bbe435

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

microcontrollers/syslog-listener.py

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#! /usr/bin/python3
2+
3+
import time
4+
import socket
5+
6+
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
7+
s.bind(('', 514))
8+
while True:
9+
data, who = s.recvfrom(4096)
10+
print(time.ctime(), who, data)

0 commit comments

Comments
 (0)