Forum C# Error Log

Error Log

Postby GMulligan » February 25th, 2010, 5:57 am

The admin panel's error log looks useful, but I'm finding that ever since it was introduced my development server has been displaying errors in the admin panel and saying nothing in the console. This has tricked me a couple times into thinking the error was coming from my flash code instead of the server side c sharp. If the console error notices could come back it would be helpful.

Right now it appears that you can only write to the error log from the main Game class. I'm sure I could surround references to all other classes with try catches, but is there any way you could make error log static, or accessible to other classes? I think it would make it more convenient to use the error log if this was possible.
GMulligan
 
Posts: 8
Joined: February 1st, 2010, 4:02 am

Re: Error Log

Postby Benjaminsen » February 25th, 2010, 11:24 am

Errors should not be saved on the serverside errorlog if you have the development server defined. If this is not the case I guess we have a bug and I will look into that.

I will also look into making an update that traces errors that happen when the game runs towards the live servers.

You can write to the error log yourself via client.errorLog.writeError http://playerio.com/documentation/refer ... o.errorlog
Benjaminsen
.IO
 
Posts: 1444
Joined: January 12th, 2010, 11:54 am
Location: Denmark

Re: Error Log

Postby Oliver » February 25th, 2010, 1:26 pm

The admin panel's error log looks useful, but I'm finding that ever since it was introduced my development server has been displaying errors in the admin panel and saying nothing in the console. This has tricked me a couple times into thinking the error was coming from my flash code instead of the server side c sharp. If the console error notices could come back it would be helpful.


I just verifed this: It's a bug, and will be fixed for the next release! The development server should *never* save an error to the error log in the admin panel.

Right now it appears that you can only write to the error log from the main Game class. I'm sure I could surround references to all other classes with try catches, but is there any way you could make error log static, or accessible to other classes? I think it would make it more convenient to use the error log if this was possible.


We can't make it static due to the way hosting, sandboxing of games from each other and communication with the player.io sandbox is implemented.

You can either pass around a reference to the game object, or simply pass around the reference to the error log.

- Oliver
User avatar
Oliver
.IO
 
Posts: 1159
Joined: January 12th, 2010, 8:29 am


Return to C#



cron