[Ace-users] [ace-users] question about runtime configuration with the ACELogging Strategy

Steve Huston shuston at riverace.com
Fri Dec 7 11:57:32 CST 2007


Hi Richard,
 
Right... the Logger stuff is built into ACE when you build it as a
shared library. When you build static, dynamic services inside of ACE
(like Logger) won't be available. You may be able to add the static
service information and allow the logging service to work as a static
service when ACE is built as a static library.
 
C++NPv2 chapter 5 describes dynamic and static services. If you need
further expertise with this project, please contact me to discuss it
further.
 
Thanks,
-Steve

--
Steve Huston, Riverace Corporation
Want to take ACE training on YOUR schedule?
See http://www.riverace.com/training.htm


-----Original Message-----
From: richard zhao [mailto:rich4tech at yahoo.com] 
Sent: Friday, December 07, 2007 11:19 AM
To: Steve Huston; ace-users at cs.wustl.edu
Subject: RE: [ace-users] question about runtime configuration with the
ACELogging Strategy


Hello, Steve,
 
thank you for your response.
in the application by using shared ACE lib. I did not write any code
and did not define any class called Logger. I just put Logger after
dynamic. do you think i need to write a class called Logger when I use
static ACE lib.
 
thanks
Richard

Steve Huston <shuston at riverace.com> wrote:

Hi Richard,
 
Thanks for the PROBLEM-REPORT-FORM. I suspect you'll need to add the
static service macros to ACE to set up the static service loading
info. Please see C++NPv2 chapter 5 for details.
 
Best regards,
-Steve
--
Steve Huston, Riverace Corporation
Want to take ACE training on YOUR schedule?
See http://www.riverace.com/training.htm


-----Original Message-----
From: ace-users-bounces at cse.wustl.edu
[mailto:ace-users-bounces at cse.wustl.edu] On Behalf Of richard zhao
Sent: Thursday, December 06, 2007 5:33 PM
To: ace-users at cs.wustl.edu
Subject: [ace-users] question about runtime configuration with the
ACELogging Strategy


ACE VERSION: 5.6.1
HOST MACHINE and OPERATING SYSTEM:  Intel PC, Linux enterprise 5.0
TARGET MACHINE and OPERATING SYSTEM: Same
COMPILER NAME AND VERSION (AND PATCHLEVEL):
G++

I am writing a application by using ACE lib.
I wrote a log application by using runtime configuration with the ACE
logging strategy,
the input configuration file is like the following.
 
dynamic Logger Service_Object * ACE:_make_ACE_Logging_Strategy() "-s
log.out -f STDERR|OSTREAM - INFO"
 
in the application file , I use the code segment:
if (ACE_Service_Config::open(argc,
                                            argv,
                                            ACE_DEFAULT_LOGGER_KEY,
                                             1,
                                             0,
                                              1) < 0)
{
}
by this way, if I compile and link ACE to shared lib, it works well, I
can create log.out and all message output to this log file.
 
however, if I compile and link ACE to static lib, this way does not
work, the log.out can not create. the error message is like the
following:
1 ACE(28532|2142880) LN::open_dll_ failed to open ACE. error: check
log for detail.
2. ACE(28532|2142880) unable to create service object for logger.
 
I guess it is because no shared lib so I change the configuration file
to the following.
 
static Logger "-s log.out -f STDERR|OSTREAM -p INFO"
 
then recompile and link my application which are using static ACE lib
the log.out still can not be created. 
error mesasge is :
SG::initialize-service Logger was not located.
even I change the fourth parameter of open to 0.
 
could someboby tell me some solutions of how to solve this problem.
that is by using static ACE lib to create log application.
thanks in advance.
 
Richard
 
  _____  

Never miss a thing. Make
<http://us.rd.yahoo.com/evt=51438/*http://www.yahoo.com/r/hs> Yahoo
your homepage. 




  _____  

Never miss a thing. Make Yahoo
<http://us.rd.yahoo.com/evt=51438/*http://www.yahoo.com/r/hs> your
homepage. 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://list.isis.vanderbilt.edu/pipermail/ace-users/attachments/20071207/d5e4b303/attachment.html 


More information about the Ace-users mailing list