Closed sify21 closed 3 months ago
TCP Socket is not suitable for log macros (info!, debug!, etc) because is a stream transport: a flush() call is needed for the logs to be sent but the log macros doesn't call it. You should use the UDP transports that sends log data line-by-line and works as expected. Maybe this should be pointed up in documentation.
See #70 for a proposed fix
fixed by #70
log
crate when using tcp (unix is ok).I debugged this by starting rsyslog with
rsyslogd -dn
, the output shows imtcp accepted the connection, but no log entry is added. I suspect that logs are not sent when usinginfo!
fromlog
crate.logger.info(...)
, must manually add '\n' at the end of every message.