Re: [Yade-dev] Logging and debugging

2013-08-21 Thread Anton Gladky
Hi Klaus,

2013/8/22 Klaus Thoeni 

> Hi guys
>
> log4cxx feature and yade.log module are not available any more, right? So
> how
> do you print your logs? I am used to use something like this in my scripts:
>
> import yade.log
> yade.log.setLevel('TheClassOfWhichLoggerYouWantToSet',yade.log.TRACE)
>

setLevel does not work any more.


> One can cmake with -DDEBUG=ON which should compile yade in debug mode.
> Before
> cmake "yade --debug" was used to run yade in debug mode. It seems that this
> option is not valid any more. So how do you guys run debug and optimized at
> the same time? Do you define an other INSTALL_PREFIX for debug?
>

Yes, you should have 2 different build-places and install debug and
optimized
versions in different paths or with different suffixes.

Cheers,

Anton
___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-dev] Logging and debugging

2013-08-21 Thread Klaus Thoeni
Hi Anton

On Thursday 22 August 2013 07:50:28 Anton Gladky wrote:
> Hi Klaus,
> 
> 2013/8/22 Klaus Thoeni 
> 
> > Hi guys
> > 
> > log4cxx feature and yade.log module are not available any more, right? So
> > how
> > do you print your logs? I am used to use something like this in my
> > scripts:
> > 
> > import yade.log
> > yade.log.setLevel('TheClassOfWhichLoggerYouWantToSet',yade.log.TRACE)
> 
> setLevel does not work any more.

So what can I use to see the log output? Is there an other way for doing it 
now? Or is this feature completely removed? If so all the LOGs in the code are 
for nothing now.

> > One can cmake with -DDEBUG=ON which should compile yade in debug mode.
> > Before
> > cmake "yade --debug" was used to run yade in debug mode. It seems that
> > this
> > option is not valid any more. So how do you guys run debug and optimized
> > at
> > the same time? Do you define an other INSTALL_PREFIX for debug?
> 
> Yes, you should have 2 different build-places and install debug and
> optimized
> versions in different paths or with different suffixes.

I see. Do I have to set something else? I just tried to put some std::cerr 
output in the code and I compiled with debug but it is not appearing. I am 
calling the right version of yade because I removed everything else before ;-) 

BTW, do you think it is possible that yade tells you that you are running it 
in debug mode? Maybe something like: Welcome to Yade 2013-08-15.git-4ef35b0 
(debug)? 

Thanks
Klaus




___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-dev] Logging and debugging

2013-08-21 Thread Anton Gladky
2013/8/22 Klaus Thoeni :
> So what can I use to see the log output? Is there an other way for doing it
> now? Or is this feature completely removed? If so all the LOGs in the code are
> for nothing now.
LOG_WARN, LOG_ERROR, LOG_FATAL should work [1].

> I see. Do I have to set something else? I just tried to put some std::cerr
> output in the code and I compiled with debug but it is not appearing.

When I debug the code, I am doing exactly the same. It should appear or this
part of code is not executed.

> BTW, do you think it is possible that yade tells you that you are running it
> in debug mode? Maybe something like: Welcome to Yade 2013-08-15.git-4ef35b0
> (debug)?

Need to think about that. Debug-mode is just adding so-called debug-symbols.
It means, that during the crash you should get some more information about that.
That is a normal practice for the software.See, how many packages are
having -dbg
suffix. Most of them are just those symbols.

[1] https://github.com/yade/trunk/blob/master/lib/base/Logging.hpp#L22

Anton

___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-dev] Logging and debugging

2013-08-27 Thread Klaus Thoeni
Hi Anton

On Thursday 22 August 2013 08:33:58 Anton Gladky wrote:
> 2013/8/22 Klaus Thoeni :
> > So what can I use to see the log output? Is there an other way for doing
> > it
> > now? Or is this feature completely removed? If so all the LOGs in the code
> > are for nothing now.
> 
> LOG_WARN, LOG_ERROR, LOG_FATAL should work [1].
> 
> > I see. Do I have to set something else? I just tried to put some std::cerr
> > output in the code and I compiled with debug but it is not appearing.
> 
> When I debug the code, I am doing exactly the same. It should appear or this
> part of code is not executed.

I thought so too but this seems not to be the case at least for me. It's 
working e.g. for classes like the contact law but if I put some outputs in 
methods of NewtonIntegrator or Shop which are definitely called it's not 
working. Even after recompiling debug from scratch. I have no idea what's 
going on here. Any idea?

> > BTW, do you think it is possible that yade tells you that you are running
> > it in debug mode? Maybe something like: Welcome to Yade
> > 2013-08-15.git-4ef35b0 (debug)?
> 
> Need to think about that. Debug-mode is just adding so-called debug-symbols.
> It means, that during the crash you should get some more information about
> that. That is a normal practice for the software.See, how many packages are
> having -dbg
> suffix. Most of them are just those symbols.
> 
> [1] https://github.com/yade/trunk/blob/master/lib/base/Logging.hpp#L22
> 
> Anton
> 
> ___
> Mailing list: https://launchpad.net/~yade-dev
> Post to : yade-dev@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~yade-dev
> More help   : https://help.launchpad.net/ListHelp


___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-dev] Logging and debugging

2013-08-27 Thread Anton Gladky
Could you, please, send a minimal script to localize the problem?

Anton


2013/8/27 Klaus Thoeni :
> Hi Anton
>
> On Thursday 22 August 2013 08:33:58 Anton Gladky wrote:
>> 2013/8/22 Klaus Thoeni :
>> > So what can I use to see the log output? Is there an other way for doing
>> > it
>> > now? Or is this feature completely removed? If so all the LOGs in the code
>> > are for nothing now.
>>
>> LOG_WARN, LOG_ERROR, LOG_FATAL should work [1].
>>
>> > I see. Do I have to set something else? I just tried to put some std::cerr
>> > output in the code and I compiled with debug but it is not appearing.
>>
>> When I debug the code, I am doing exactly the same. It should appear or this
>> part of code is not executed.
>
> I thought so too but this seems not to be the case at least for me. It's
> working e.g. for classes like the contact law but if I put some outputs in
> methods of NewtonIntegrator or Shop which are definitely called it's not
> working. Even after recompiling debug from scratch. I have no idea what's
> going on here. Any idea?
>
>> > BTW, do you think it is possible that yade tells you that you are running
>> > it in debug mode? Maybe something like: Welcome to Yade
>> > 2013-08-15.git-4ef35b0 (debug)?
>>
>> Need to think about that. Debug-mode is just adding so-called debug-symbols.
>> It means, that during the crash you should get some more information about
>> that. That is a normal practice for the software.See, how many packages are
>> having -dbg
>> suffix. Most of them are just those symbols.
>>
>> [1] https://github.com/yade/trunk/blob/master/lib/base/Logging.hpp#L22
>>
>> Anton
>>
>> ___
>> Mailing list: https://launchpad.net/~yade-dev
>> Post to : yade-dev@lists.launchpad.net
>> Unsubscribe : https://launchpad.net/~yade-dev
>> More help   : https://help.launchpad.net/ListHelp
>
>
> ___
> Mailing list: https://launchpad.net/~yade-dev
> Post to : yade-dev@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~yade-dev
> More help   : https://help.launchpad.net/ListHelp

___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-dev] Logging and debugging

2013-08-27 Thread Klaus Thoeni
Hi Anton,

I put a std::cerr in the first line of Newtonintegrator::action() in 
Newtonintegrator.cpp. Any script with NewtonIntegrator should call this 
method. Or am I wrong? 

Klaus

On Wednesday 28 August 2013 07:43:48 Anton Gladky wrote:
> Could you, please, send a minimal script to localize the problem?
> 
> Anton
> 
> 2013/8/27 Klaus Thoeni :
> > Hi Anton
> > 
> > On Thursday 22 August 2013 08:33:58 Anton Gladky wrote:
> >> 2013/8/22 Klaus Thoeni :
> >> > So what can I use to see the log output? Is there an other way for
> >> > doing
> >> > it
> >> > now? Or is this feature completely removed? If so all the LOGs in the
> >> > code
> >> > are for nothing now.
> >> 
> >> LOG_WARN, LOG_ERROR, LOG_FATAL should work [1].
> >> 
> >> > I see. Do I have to set something else? I just tried to put some
> >> > std::cerr
> >> > output in the code and I compiled with debug but it is not appearing.
> >> 
> >> When I debug the code, I am doing exactly the same. It should appear or
> >> this part of code is not executed.
> > 
> > I thought so too but this seems not to be the case at least for me. It's
> > working e.g. for classes like the contact law but if I put some outputs in
> > methods of NewtonIntegrator or Shop which are definitely called it's not
> > working. Even after recompiling debug from scratch. I have no idea what's
> > going on here. Any idea?
> > 
> >> > BTW, do you think it is possible that yade tells you that you are
> >> > running
> >> > it in debug mode? Maybe something like: Welcome to Yade
> >> > 2013-08-15.git-4ef35b0 (debug)?
> >> 
> >> Need to think about that. Debug-mode is just adding so-called
> >> debug-symbols. It means, that during the crash you should get some more
> >> information about that. That is a normal practice for the software.See,
> >> how many packages are having -dbg
> >> suffix. Most of them are just those symbols.
> >> 
> >> [1] https://github.com/yade/trunk/blob/master/lib/base/Logging.hpp#L22
> >> 
> >> Anton
> >> 
> >> ___
> >> Mailing list: https://launchpad.net/~yade-dev
> >> Post to : yade-dev@lists.launchpad.net
> >> Unsubscribe : https://launchpad.net/~yade-dev
> >> More help   : https://help.launchpad.net/ListHelp
> > 
> > ___
> > Mailing list: https://launchpad.net/~yade-dev
> > Post to : yade-dev@lists.launchpad.net
> > Unsubscribe : https://launchpad.net/~yade-dev
> > More help   : https://help.launchpad.net/ListHelp


___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp