c - What is the syslog() facility if none is net using openlog() -


i trying use syslog() , reading through man pages tells me in openlog(), "the facility argument establishes default used if none specified in subsequent calls syslog()"

so understand, way : 1. call openlog set facility 2. call syslog() log. 3. call closelog().

but if not call openlog() before calling syslog()? facility then? meant "establishes default used if none specified". can 1 specified, if not openlog()?

aah think got it. think means for

syslog(int priority, const char *message, ...);

here priority can multiple flags, given in freebsd man page example :

syslog(log_info|log_local2, "foobar error: %m");

here facility log_local2 , priority log_info. facility mentioned in openlog() take effect if none provided in call syslog() above.


Comments

Popular posts from this blog

php - mySql Join with 4 tables -

css - Text drops down with smaller window -

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -