Liblogging can do this. Rainer
Sent from phone, thus brief. Vitaly Repin via rsyslog <[email protected]> schrieb am Mo., 21. Sep. 2020, 14:10: > Hello, > > Den mån 21 sep. 2020 kl 13:55 skrev Mariusz Kruk <[email protected]>: > > > >> Why not log to local TCP socket? > > > glibc does not allow that. Is there any library I can use to log via > TCP socket? > > Well, there are many different logging frameworks. I suppose, since > > you're looking into glibc sources, you're writing in C so I'd check, for > > example log4c. Unless you're doing something very low-level, it's > > usually useful to have a decent logging framework. > > Yes. But log4c uses glibc inside, looks like (Checked > src/appender_type_syslog.c) > > I work in a project with its own logging framework. And I am in > position to change its implementation if needed. > > > > Of course I can cherry pick the code from rsyslog implementation > > > (imptcp module). But is it the easiest/best approach? > > > > > > I am a little bit surprised that I was not able to find a ready-to-use > > > non-glibc implementation of a syslog client library for C/C++. > > > > Maybe you're looking for a wrong thing. :-) > > > Logging framework is more than just a syslog client. > > Yep. Usually they rely on glibc implementation to deliver syslog > logging functionality. Which logs through /dev/log only: > > https://sourceware.org/git/?p=glibc.git;a=blob;f=misc/syslog.c;h=2cc63ef287a71fc6447774773adbffddaae514f3;hb=HEAD > (check openlog_internal function. _PATH_LOG is set to "/dev/log" in a > header file). > > -- > WBR & WBW, Vitaly > _______________________________________________ > rsyslog mailing list > https://lists.adiscon.net/mailman/listinfo/rsyslog > http://www.rsyslog.com/professional-services/ > What's up with rsyslog? Follow https://twitter.com/rgerhards > NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad > of sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you > DON'T LIKE THAT. _______________________________________________ rsyslog mailing list https://lists.adiscon.net/mailman/listinfo/rsyslog http://www.rsyslog.com/professional-services/ What's up with rsyslog? Follow https://twitter.com/rgerhards NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T LIKE THAT.

