Currently Online

Latest Posts

Topic: asserts and redirect to file

Tibor
Joined: 2009-03-23, 23:24
Posts: 1332
Ranking
One Elder of Players
Location: Slovakia
Posted at: 2016-09-17, 21:04

Hi

I am redirecting console output of game to a file like this:

widelands 2>&1 | tee $filename

But I noticed the assert text (the game crashed due to assert) is not redirected to the file and thus it is lost to me, unless I by chance spot the text in terminal. I tried to google but somehow I cannot find relevant information what is the issue.

Any ideas how to do it?

Thanks


Top Quote
GunChleoc
Avatar
Joined: 2013-10-07, 15:56
Posts: 3159
Ranking
One Elder of Players
Location: RenderedRect
Posted at: 2016-09-18, 07:45

I guess it depends on whether they are printed to stderr or stdout. Maybe this page will help: http://www.cyberciti.biz/faq/redirecting-stderr-to-stdout/


Busy indexing nil values

Top Quote
Tibor
Joined: 2009-03-23, 23:24
Posts: 1332
Ranking
One Elder of Players
Location: Slovakia
Posted at: 2016-09-19, 21:44

I already have stderr redirected to stdout, see my post above.

It looks like assert text is not printed by widelands binary but something else...


Top Quote
GunChleoc
Avatar
Joined: 2013-10-07, 15:56
Posts: 3159
Ranking
One Elder of Players
Location: RenderedRect
Posted at: 2016-09-20, 08:11

I've done some more digging, and all I found out is that it's a macro. So, I guess it would depend on your compiler where it goes.


Busy indexing nil values

Top Quote