How do I create error logs in a SDL Wii program?
August 11, 2010 07:09PM
Alright, so sorry about asking another question when my first one hasn't even been answered yet, but I think this one can help with that one. Anyway, I was wondering how I would go about creating a error log for my program.

I tried:

printf("error");

and nothing came on the screen or showed up in any log files. I know that printf displays to consoles, but I thought maybe it was overwritten to be more useful in Wii SDL.

Next I tried:

fprintf(stderr, "error!);

Once again I got no on screen text or error logs. I assumed that the std part of stderr was for stdio, but I guess not?

Anyway how can I create error logs in my SDL Wii program?
Re: How do I create error logs in a SDL Wii program?
August 11, 2010 08:37PM
Once GX is initialized, you can't output text to the console via printf() anymore. For many of my projects, we have used dhewg's log console ( [code.google.com] and [code.google.com] ) to print debug information to the screen. Alternatively, you can print debug information to your SD Card or a USB Gecko (the latter device is the preferred choice for most developers).



Edited 2 time(s). Last edit at 08/11/2010 10:46PM by Arikado.
Re: How do I create error logs in a SDL Wii program?
August 11, 2010 09:02PM
Well, thank you for your helpful reply, but I managed to figure it out. All you need to do is:

FILE * errorlog = fopen("sd:\errorlog.txt","w");
fprintf(errorlog,"error!");

Edit: lol, I guess I should have read the reply more carefully. I'll have to check the debug console out as on-screen debug info is way better than a log. ^_^



Edited 2 time(s). Last edit at 08/11/2010 09:04PM by Cypri.
Sorry, only registered users may post in this forum.

Click here to login