Page 1 of 1

Writing to logs?!

Posted: 11 November 2019, 23:04
by Robo65
Hello,

I can write self::debug() messages from my .game.php __constructor method.

But, self::debug() from setupNewGame doesn't work. Any tips what might be happening here?

Robo

Re: Writing to logs?!

Posted: 12 November 2019, 00:15
by vincentt
Hi,

I use another approach when something doesn't work and I really do not understand it. I throw an exception that is displayed directly on the web page. I know for a fact that it works for setupnewgame, so if you have something that you do not understand this may help you.

About why self::debug() doesn't work in setupnewgame, I have no idea. I guess an admin should be able to help you (it may be a bug =/)

Vincent

Re: Writing to logs?!

Posted: 12 November 2019, 18:45
by DrKarotte
No idea, but maybe it's connected to this special behaviour of notifications sent during setup, i quote the doc:

"Notifications sent between the game start (setupNewGame) and the end of the "action" method of the first active state will never reach their destination."