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

richard zhao rich4tech at yahoo.com
Thu Dec 6 16:32:32 CST 2007


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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://list.isis.vanderbilt.edu/pipermail/ace-users/attachments/20071206/28a357c3/attachment.html 


More information about the Ace-users mailing list