[omniORB] omniORB::log and omniORB::logger and syslog

Robert E. Gruber gruber@research.att.com
Tue, 30 Oct 2001 10:35:19 -0500


If you cannot redirect stderr externally, the easiest thing to do would be
to add a log file option (-ORBlogFile ??) and to open the file during ORB
init and clos it during ORB cleanup, and then direct the logger fprintf
calls to a FILE* which could either refer to stderr or the file that got
opened.

I suspect not all operating systems that omniORB builds on have a unix-like
syslog.

-- Bob

-----Original Message-----
From: owner-omniorb-list@uk.research.att.com
[mailto:owner-omniorb-list@uk.research.att.com]On Behalf Of David Byron
Sent: Monday, October 29, 2001 9:50 PM
To: omniorb-list@uk.research.att.com
Subject: [omniORB] omniORB::log and omniORB::logger and syslog


I'm using omniORB 3.0.4 and I'd like to change omniORB::log and
omniORB::logger to use syslog instead of doing an fprintf on stderr.  I'm
using a system without an MMU, so doing some redirection to a program that
will call syslog for me is going to be complicated and take more memory than
just changing the code to call syslog directory.

Has anyone thought about doing this?  It looks like the changes are all
happily local to src/lib/omniORB2/orbcore/logIOStream.cc.  Is that what
other folks think as well?

I'm also curious why both omniORB::log and omniORB::logger exist.
omniORB::logger writes to a small memory buffer and then only calls
fprintf(stderr) in its destructor.  omniORB::logger also doesn't
fflush(stderr), but omniORB::log does.  This would make sense to me if
omniORB::logger was used in places where time or swapping was a big
consideration, perhaps because stderr was connected to a 9600 baud terminal.

If other people are interested in this functionality, and implementing it in
a certain way would help you, let me know and I'll take that into
consideration.

Thanks for your input.  I've found some discussion of syslog in the
archives, but it was mostly focused around removing it from tcpwrappers, not
adding it to omniORB.

-DB
---
David Byron                     dbyron@coactive.com
Coactive Networks, Inc.         http://www.coactive.com
28 Liberty Ship Way             voice:(415)289-7800
Sausalito, CA  94965            fax:(415)289-1320