Bug 3938 - add option to redirect all console output to a file
Summary: add option to redirect all console output to a file
Status: ASSIGNED
Alias: None
Product: TAO
Classification: Unclassified
Component: IDL Compiler (show other bugs)
Version: 1.8.3
Hardware: All Linux
: P3 enhancement
Assignee: DOC Center Support List (internal)
URL:
Depends on:
Blocks:
 
Reported: 2010-12-07 19:44 CST by Johnny Willemsen
Modified: 2018-01-15 11:21 CST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Johnny Willemsen 2010-12-07 19:44:51 CST
it would make some tests easier if the tao_idl compiler has an option to redirect all its console output to a file, that file than can be easily parsed by the test framework if needed
Comment 1 Jeff Parsons 2011-02-08 14:03:39 CST
Studied ACE logging and this is what I found so far:

As far as I can tell, all the console output of tao_idl comes through ACE_DEBUG and ACE_ERROR.

ACE_DEBUG and ACE_ERROR are hard-coded to use ACE_Log_Msg::instance(). An option to the IDL compiler can easily be used to configure the singleton to write to a file of a given name.

The question is, do parallel builds occur in separate processes, and if so, do we get a different logging singleton per process? If yes to both of these questions, we're ok. If not, then the reconfiguration of the singleton by an IDL compiler option will also have to trigger the acquisition of the singleton's lock for the duration of the tao_idl execution. This might slow down parallel builds.

In any case, the changes to support this enhancement will not be hard at all. I've already done the singleton reconfiguration and restoration in a small test program. In the IDL compiler, the only additional tasks will be parsing the option, adding some storage in IDL_GlobalData for necessary values, and splitting up the reconfig and restoration to occur at the beginning and the end, respectively, of execution.