[ace-users] ACE/TAO Logging

Michael T. Carter mcarter at swri.org
Thu Jul 19 11:56:35 CDT 2007


I was able to dig into the ace/tao code and have determined a few
things in dealing with the svc.conf file.

The code in TAO_Internal,cpp processes several command line
parameters, including -ORBSvcConf.  It creates the necessary
arguments (-f name) that ace uses to process the svc.conf file
from the "command-line".  However, the tao code uses the
::open from the Service_Config (Gestalt) without the
ignore_debug_flag argument, thus defaulting to 0/false.
As noted by the comments in the header, when this flag
is false, the priorities that are set are just local to the open
function and therefore do not become global settings.

When the svc.conf is called out on the command-line with
ORBSvcConf, why doesn't the tao code call the open
with a 1/true for the ignore_debug_flag?  What is the
impact if this is changed?

My initial ace test code used what is prescribe in the ACE
Programmers Guide in calling the ACE_Service_Config::open,
which included setting the last parameter (ignore_debug_flag)
to 1.  When modified to 0(zero) as in the tao code, the ace
test code produced the same problem of not using the priorities
defined in the svc.conf file after the open.

However, I would still like to emphasize that ACE 5.5.* is
still having problems with the reconfigure.  I do not know
if using reconfigure was a workaround for the initial svc.conf
processing in 5.4 or is actually needed because it processing
causes global priority settings.  The Logger is not reconfigured.

Is there a workaround to force the deletion of the service before
reconfiguring takes place?  I tried fini_svcs() and close_svcs()
and they called other issues.

thanks
--
Michael

Michael T. Carter wrote:
> VERSION 1.4       VERSION 1.5
> ACE: 5.4a_p13     ACE: 5.5.9
> TAO: 1.4aPp13     TAO: 1.5.9
>
> I have now updated my 1.5 versions to x.5.9.  I have even
> updated my 1.4 version to patchlevel 13.
>
> I am not really interested in support for the 1.4 version, even
> though I do have projects using it.  Main reason I mentioned it
> was the behavior difference of the dynamic logging between 1.4
> and 1.5.
>
> ACE 5.5.9 still "works" in that the original svc.conf is processed
> and only allows the DEBUG, WARNING, and ERROR messages through.  The
> reconfigure has the same problem in warning/error that the Logger is
> already initialized (remove before re-initializing).
>
> TAO 5.5.9 has the same problem as with 5.5.4.  It does not recognize
> any thread priority settings in the svc.conf file.  With 1.4, at least
> the reconfigure caused it to do something right, but with 5.5.* the
> reconfigure give the warning/error message described above and I guess
> the Logger is never really reconfigured.
>
> Back to my original questions,
>
> (1) why doesn't the TAO version (ORB_init) process the svc.conf file
>    the first time around like the ACE_Service_Config::open does with
>    just using ACE, and
> (2) why doesn't the reconfigure actually work in the latest
>    5.5* versions.
>
> I took a peek at the source code where the "Remove before re-init..."
> debug message is outputted and found the following comment in the
> code comment:
>
>  // If there is an active service already, it must first be removed,
>  // before it could be re-installed.
>  // IJ: This used to be the behavior, before allowing multiple
>  // independent service repositories. Should that still be required?
>
> So this may not be behaving as intended.
> -- 
> Michael
>
>
> Douglas C. Schmidt wrote:
>> Hi Michael,
>>
>>    Thanks for using the PRF.
>>
>>  
>>> VERSION 1.4       VERSION 1.5
>>> ACE: 5.4a_p4      ACE: 5.5.4
>>> TAO: 1.4aPp4      TAO: 1.5.4
>>>     
>>
>> Please upgrade to ACE+TAO+CIAO x.5.9 (i.e., ACE 5.5.9, TAO 1.5.9, and
>> CIAO 0.5.9), which you can download from
>>
>> http://download.dre.vanderbilt.edu
>>
>> under the heading: "Latest Beta Kit".
>>
>> The DOC groups at Washington University, UC Irvine, and Vanderbilt
>> University only provide "best effort" support for non-sponsors for the
>> latest release, as described in
>>
>> http://www.dre.vanderbilt.edu/~schmidt/DOC_ROOT/ACE/docs/ACE-bug-process.html 
>>
>>
>> Thus, if you need more "predictable" help for earlier versions of
>> ACE+TAO, I recommend that you check out
>>
>> http://www.dre.vanderbilt.edu/support.html
>>
>> for a list of companies that will provide you with ACE+TAO commercial
>> support.
>>
>> Thanks,
>>
>>         Doug
>>
>>
>>  
>>> HOST/TARGET MACHINE: Linux (RedHat AS3 - but same issue on AS4)
>>>
>>> COMPILER: gcc version 3.2.3 20030502 (Red Hat Linux 3.2.3-52)
>>>
>>> I have created a simple program that outputs various ACE_DEBUG levels
>>> (TRACE,DEBUG.INFO.NOTICE,ERROR).  I also have a svc.conf file that
>>> disables a few so they will not appear in the output:
>>>
>>> dynamic Logger Service_Object * ACE:_make_ACE_Logging_Strategy()
>>>    "-f STDERR -o -p ~TRACE|DEBUG|~INFO|WARNING|~NOTICE|ERROR|"
>>>
>>> One version is written to use just ACE (-d for debug and -f name
>>> for svc.conf use) and the other with TAO (-ORBDebug for debug and
>>> -ORBSvcConf for svc.conf).  I print out one group of debug messages,
>>> perform a ACE_Service_Config::reconfigure(), and then another group
>>> of debug messages.
>>>
>>> The ACE version that uses the ACE_Service_Config::open behaves
>>> as expected in both versions (even though there is an Logger
>>> re-inititalize warning in the 1.5 version) in that is outputs
>>> only the DEBUG, WARNING, and ERROR statements.  The valid output
>>> occurs before and after the reconfigure.
>>>
>>> The issues:
>>>
>>> (1) In both versions (1.4/1.5) of the TAO test code, the svc.conf
>>>    "appears" to load properly at startup, but the first set of debug
>>>    messages include all messages types, as if the sync.conf file
>>>    or the priorities are ignored.
>>>
>>> (2) With the 1.4 version of the TAO test code, the proper debug
>>>    messages are outputted only after the ::reconfigure() is called.
>>>    This does not occur in the 1.5 version.  In fact, there is no
>>>    way of disabling any priorities, every log level is outputted.
>>>
>>> (3) I do not know if this is part of the problem with the 1.5 but
>>>    when performing the reconfigure function, the ACE::debug output
>>>    shows the following "warning":
>>>
>>>    ACE (13041|3076387488) SG::initialize - repo=0x8790468,
>>>       Logger is already initialized. Remove before re-initializing
>>>
>>>    This is the same output seen with the ACE test code.  I could not
>>>    find a way to remove the dynamic services before calling
>>>    reconfigure.
>>>
>>> Our current project is using the ACE/TAO 1.5, but the log files are
>>> being overwhelmed with all debug levels.  Any help would be greatly
>>> appreciated.
>>> -- 
>>> Michael
>>>
>>>     
>>
>>
>>   
>



More information about the Ace-users mailing list