Back to index

natlog  0.91.0
setupstdmsg.cc
Go to the documentation of this file.
00001 #include "natfork.ih"
00002 
00003 void NatFork::setupStdMsg()
00004 {
00005     if (d_options.stdout())             // if --stdout, then messages also go
00006         d_multiStreambuf.insert(cout);  // to stdout
00007 
00008     if (d_options.syslog())             // always set up syslog
00009     {
00010         d_syslog.reset(
00011             new SyslogStream(
00012                 d_options.syslogTag().c_str(), d_options.syslogPriority(), 
00013                 d_options.syslogFacility()
00014             )
00015         );
00016 
00017         d_multiStreambuf.insert(*d_syslog);
00018     }
00019 
00020     checkSyslogParam("facility", d_options.facility(), 
00021                                  d_options.syslogFacilityError());
00022 
00023     checkSyslogParam("priority", d_options.priority(), 
00024                                  d_options.syslogPriorityError());
00025 }
00026 
00027 
00028