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

richard zhao rich4tech at yahoo.com
Fri Dec 7 10:18:47 CST 2007


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 Yahoo your homepage. 

       
---------------------------------
Never miss a thing.   Make Yahoo your homepage.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://list.isis.vanderbilt.edu/pipermail/ace-users/attachments/20071207/955cced2/attachment-0001.html 


More information about the Ace-users mailing list