[ace-users] Enabling ACE "internal" logs

Templie Cédric cedric.templie at echotechnologies.ch
Thu Jul 26 11:01:42 CDT 2007


Hi,

Here is the code I used to enable the log:

ACE_LOG_MSG->priority_mask( LM_ERROR | LM_DEBUG, ACE_Log_Msg::PROCESS );
ACE_Log_Msg::enable_debug_messages( LM_DEBUG );
ACE_Log_Msg::enable_debug_messages( LM_ERROR );
ACE::debug( true );


Unfortunately, for me, the usage of priority_mask only, like described 
in APG book, was not enough to enable logging.
This is the only inconsistency I see with the book.

This is as well the only things I can provide to help you, I do not 
change anything in the rest of my application neither in ACE.

Cédric Templie


Steve Huston wrote:
> If someone can send me a _concise_ source code example that
> illustrates the inconsistency, I'll take a look at it.
>
> -Steve
>
> --
> Steve Huston, Riverace Corporation
> Would you like ACE to run great on your platform?
> See http://www.riverace.com/sponsor.htm
>
>
>   
>> -----Original Message-----
>> From: schmidt at dre.vanderbilt.edu [mailto:schmidt at dre.vanderbilt.edu]
>>     
>
>   
>> Sent: Sunday, July 22, 2007 4:04 PM
>> To: Asif Lodhi; ace-users at cse.wustl.edu; shuston at riverace.com
>> Subject: Re: [ace-users] Enabling ACE "internal" logs 
>>
>>
>>
>> Hi Asif,
>>
>>     
>>> The same sequence of things happened to me in 5.5.7. The point is:
>>> debug messages and priority_mask settings are "not" 
>>>       
>> according to what
>>     
>>> is explained in APG. I ran into the same problem and had succeeded
>>> after trying the same solution that Cédric tried.
>>>       
>> I'll let Steve H. address the isue of APG consistency!
>>
>> Thanks,
>>
>>         Doug
>>
>>     
>>> --
>>> Best regards,
>>>
>>> Asif
>>>
>>>
>>> On 7/20/07, Douglas C. Schmidt <schmidt at dre.vanderbilt.edu> wrote:
>>>       
>>>> Hi Cedric,
>>>>
>>>>    I'm glad things are working for you now!
>>>>
>>>>    Thanks,
>>>>
>>>>         Doug
>>>>
>>>>         
>>>>> I re-checked everything, using the examples and tests.
>>>>> And finally i succeed to have logs :)
>>>>>
>>>>> Here is what I set exactly in main:
>>>>>
>>>>> /ACE_LOG_MSG->priority_mask( LM_ERROR | LM_DEBUG, 
>>>>>           
>> ACE_Log_Msg::PROCESS );
>>     
>>>>> ACE_Log_Msg::enable_debug_messages( LM_DEBUG );
>>>>> ACE_Log_Msg::enable_debug_messages( LM_ERROR );
>>>>>
>>>>> ACE::debug( true );/
>>>>>
>>>>> It seems that I never tried to set everything all 
>>>>>           
>> together, this is the
>>     
>>>>> only explanation I see.
>>>>>
>>>>> Thanks again for your answers.
>>>>>
>>>>> Templie Cédric
>>>>>
>>>>> Templie Cédric wrote:
>>>>>           
>>>>>> Hi,
>>>>>>
>>>>>> I have an answer for all of your points :)
>>>>>>
>>>>>> - I follow the code using the debugger, and I see 
>>>>>>             
>> that an error occurs.
>>     
>>>>>> - I use priority_mask with LM_ERROR set inside, 
>>>>>>             
>> should I do something
>>     
>>>>>> else to enable LM_ERROR logging ?
>>>>>> - Well this is my problem it seems that I cannot turn 
>>>>>>             
>> on logging.
>>     
>>>>>> - I used ACE_Task to spawn threads.
>>>>>>
>>>>>> This is what I do in main:
>>>>>>
>>>>>> ACE_LOG_MSG->priority_mask( LM_ERROR | LM_DEBUG, 
>>>>>>             
>> ACE_Log_Msg::PROCESS );
>>     
>>>>>> I even tried:
>>>>>>
>>>>>> ACE_Log_Msg::enable_debug_messages( LM_ERROR );
>>>>>> ACE::debug( true );
>>>>>>
>>>>>> I do not know why it does not work.
>>>>>>
>>>>>> Thanks again for your answer.
>>>>>>
>>>>>> Cédric Templie
>>>>>>
>>>>>> Steve Huston wrote:
>>>>>>
>>>>>>             
>>>>>>> If you're not seeing the message from the logging 
>>>>>>>               
>> code you showed,
>>     
>>>>>>> then:
>>>>>>>
>>>>>>> - there wasn't an error
>>>>>>> - you've disabled LM_ERROR logging
>>>>>>> - logging is off all together
>>>>>>> - you're running in a thread without ACE logging set 
>>>>>>>               
>> up (did you spawn
>>     
>>>>>>> a thread yourself, not using ACE, and have it call 
>>>>>>>               
>> ACE methods?)
>>     
>>>>>>> -Steve
>>>>>>>
>>>>>>> --
>>>>>>> Steve Huston, Riverace Corporation
>>>>>>> Would you like ACE to run great on your platform?
>>>>>>> See http://www.riverace.com/sponsor.htm
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>               
>>>>>>>> -----Original Message-----
>>>>>>>> From: ace-users-bounces at cse.wustl.edu
>>>>>>>> [mailto:ace-users-bounces at cse.wustl.edu] On Behalf 
>>>>>>>>                 
>> Of Templie Cédric
>>     
>>>>>>>> Sent: Thursday, July 19, 2007 5:41 AM
>>>>>>>> To: Johnny Willemsen
>>>>>>>> Cc: ace-users at cs.wustl.edu
>>>>>>>> Subject: Re: [ace-users] Enabling ACE "internal" logs
>>>>>>>>
>>>>>>>>
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>> Thanks for your quick answer.
>>>>>>>>
>>>>>>>> Unfortunately, even when I set ACE::debug(), I do 
>>>>>>>>                 
>> not see any
>>     
>>>>>>>>                 
>>>>>>> logs....
>>>>>>>
>>>>>>>
>>>>>>>               
>>>>>>>> Here is the example of logs I want to see.
>>>>>>>> In ACE_Asynch_Connector<HANDLER>::connect(...) there is
>>>>>>>> following lines:
>>>>>>>>
>>>>>>>> ACE_ERROR_RETURN ((LM_ERROR,
>>>>>>>>                                            
>>>>>>>>                 
>> ACE_LIB_TEXT ("%p\n"),
>>     
>>>>>>>>                                            ACE_LIB_TEXT
>>>>>>>> ("ACE_Asynch_Connect::connect")),
>>>>>>>>                                              -1);
>>>>>>>>
>>>>>>>> As I understand this is supposed to write a log 
>>>>>>>>                 
>> before returning -1
>>     
>>>>>>>> value. The fact is that I do not succeed at all to 
>>>>>>>>                 
>> see the log...
>>     
>>>>>>>> Do you have an idea of my problem ?
>>>>>>>>
>>>>>>>> Thanks again
>>>>>>>>
>>>>>>>> Cédric Templie
>>>>>>>>
>>>>>>>> Johnny Willemsen wrote:
>>>>>>>>
>>>>>>>>
>>>>>>>>                 
>>>>>>>>> Hi,
>>>>>>>>>
>>>>>>>>> Thanks for using the PRF form. ACE doesn't has real much
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>                   
>>>>>>>> internally logging.
>>>>>>>>
>>>>>>>>
>>>>>>>>                 
>>>>>>>>> The ACE service configurator framework does output some
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>                   
>>>>>>>> messages when
>>>>>>>>
>>>>>>>>
>>>>>>>>                 
>>>>>>>>> ACE::debug() is enabled, but nothing else specific. TAO
>>>>>>>>>                   
> is
>   
>>>>>>>>>                   
>>>>>>>> a different
>>>>>>>>
>>>>>>>>
>>>>>>>>                 
>>>>>>>>> story, there we have a lot of logging. You can enabled
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>                   
>>>>>>>> tracing in ACE during
>>>>>>>>
>>>>>>>>
>>>>>>>>                 
>>>>>>>>> compilation but that will result in a lot of messages.
>>>>>>>>>
>>>>>>>>> Regards,
>>>>>>>>>
>>>>>>>>> Johnny Willemsen
>>>>>>>>> Remedy IT
>>>>>>>>> Postbus 101
>>>>>>>>> 2650 AC  Berkel en Rodenrijs
>>>>>>>>> The Netherlands
>>>>>>>>> www.theaceorb.nl / www.remedy.nl
>>>>>>>>>
>>>>>>>>> *** Integrated compile and test statistics see
>>>>>>>>> http://scoreboard.theaceorb.nl ***
>>>>>>>>> *** Commercial service and support for ACE/TAO/CIAO
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>                   
>>>>>>> ***
>>>>>>>
>>>>>>>
>>>>>>>               
>>>>>>>>> *** See http://www.theaceorb.nl/en/support.html
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>                   
>>>>>>> ***
>>>>>>>
>>>>>>>
>>>>>>>               
>>>>>>>>>
>>>>>>>>>                   
>>>>>>>>>> Hello,
>>>>>>>>>>
>>>>>>>>>> I use a simplified version of PRF, because I do 
>>>>>>>>>>                     
>> not report an
>>     
>>>>>>>>>> issue, I
>>>>>>>>>> just have a question.
>>>>>>>>>>
>>>>>>>>>> ACE VERSION: 5.5.9
>>>>>>>>>>
>>>>>>>>>> HOST MACHINE and OPERATING SYSTEM:
>>>>>>>>>> 	If on Windows based OS's, which version of WINSOCK do
>>>>>>>>>> you use?: Windows XP SP 2
>>>>>>>>>>
>>>>>>>>>> TARGET MACHINE and OPERATING SYSTEM, if different 
>>>>>>>>>>                     
>> from HOST:
>>     
>>>>>>>>>> COMPILER NAME AND VERSION (AND PATCHLEVEL): 
>>>>>>>>>>                     
>> Microsoft Visual
>>     
>>>>>>>>>> Studio.net (MSVC 7.1)
>>>>>>>>>>
>>>>>>>>>> THE $ACE_ROOT/ace/config.h FILE: config-win32.h
>>>>>>>>>>
>>>>>>>>>> SYNOPSIS:
>>>>>>>>>>
>>>>>>>>>>     I want to enable ACE internal logs, but I do not
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>                     
>>>>>>>> succeed at all.
>>>>>>>>
>>>>>>>>
>>>>>>>>                 
>>>>>>>>>>     I tried a lot of things as explained in the APG book
>>>>>>>>>> chapter 3, but
>>>>>>>>>> still do not see ACE "internal" logs.
>>>>>>>>>>     I succeed to see the log I wrote, but I never see
>>>>>>>>>>                     
> ACE
>   
>>>>>>>>>> "internal" logs.
>>>>>>>>>>
>>>>>>>>>>     I certainly missed something in the ACE
>>>>>>>>>>                     
> configuration,
>   
>>>>>>>>>>                     
>>>>>>>> even maybe
>>>>>>>>
>>>>>>>>
>>>>>>>>                 
>>>>>>>>>> during the build.
>>>>>>>>>>
>>>>>>>>>> Thanks in advance
>>>>>>>>>>
>>>>>>>>>> Cédric Templie
>>>>>>>>>>
>>>>>>>>>> _______________________________________________
>>>>>>>>>> ace-users mailing list
>>>>>>>>>> ace-users at mail.cse.wustl.edu
>>>>>>>>>> http://mail.cse.wustl.edu/mailman/listinfo/ace-users
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>                     
>>>>>>>>>
>>>>>>>>>                   
>>>>>>>> _______________________________________________
>>>>>>>> ace-users mailing list
>>>>>>>> ace-users at mail.cse.wustl.edu
>>>>>>>> http://mail.cse.wustl.edu/mailman/listinfo/ace-users
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>                 
>>>>>>>               
>>>>>> _______________________________________________
>>>>>> ace-users mailing list
>>>>>> ace-users at mail.cse.wustl.edu
>>>>>> http://mail.cse.wustl.edu/mailman/listinfo/ace-users
>>>>>>
>>>>>>             
>>>>> _______________________________________________
>>>>> ace-users mailing list
>>>>> ace-users at mail.cse.wustl.edu
>>>>> http://mail.cse.wustl.edu/mailman/listinfo/ace-users
>>>>>           
>>>> _______________________________________________
>>>> ace-users mailing list
>>>> ace-users at mail.cse.wustl.edu
>>>> http://mail.cse.wustl.edu/mailman/listinfo/ace-users
>>>>
>>>>         
>
>
> _______________________________________________
> ace-users mailing list
> ace-users at mail.cse.wustl.edu
> http://mail.cse.wustl.edu/mailman/listinfo/ace-users
>   



More information about the Ace-users mailing list