|
Stuart Langley - 2013-05-20 21:42:37
Nice article, just one thing i'd like to point out is that using syslog() will log to the application logs. Note sure where you read it's not possible to write logs from your app on app engine.
Ciao.
Manuel Lemos - 2013-05-20 22:14:03 - In reply to message 1 from Stuart Langley
I was not talking about application logs. I was talking about PHP error logs.
In a PHP installation you can tell PHP to send any runtime errors to a file that you can monitor to see if there is any unexpected problems with your PHP code.
I could not find a way to enable that in AppEngine. Maybe it is not documented or not yet implemented. I am sure it will be done soon or later because that is important.
Stuart Langley - 2013-05-20 22:39:27 - In reply to message 2 from Manuel Lemos
can you give me an example?
error_log can write to syslog, which can be configured via php.ini so I'm not sure what you're referring to if it's not that.
Manuel Lemos - 2013-05-20 22:44:35 - In reply to message 3 from Stuart Langley
No, I am not talking about of explicit error log entries generated by your application.
Lets say you have a bug in your application and it accesses an undefined variable. If you have PHP error log enabled, it will add a error log entry.
I did not see a way in AppEngine to enable error logging to files or whatever way that I can monitor and be notified as it happens.
Just FYI, I use a simple PHP class to monitor the php_error_log file and mail be as soon as a log entry is added to the PHP error log file. I lost count of how much this saved me from bugs that could have caused greater harm if I did not get notified and fixed them.
Stuart Langley - 2013-05-21 03:12:19 - In reply to message 4 from Manuel Lemos
All of those things end up in the application logs - which you see in the admin console, can filter by category, regex, read back into your app using APIs, push to the BigQuery etc.
Manuel Lemos - 2013-05-21 03:36:51 - In reply to message 5 from Stuart Langley
Oh, I see. I did not find that information in the available documentation.
So would it be possible to monitor specifically any new entries added to the PHP error logs and somehow send the new entries to a certain email? That is what I do to monitor unexpected PHP problems.
Stuart Langley - 2013-05-21 03:59:07 - In reply to message 6 from Manuel Lemos
provided you write the code yourself to monitor the logs
Manuel Lemos - 2013-05-21 04:38:38 - In reply to message 7 from Stuart Langley
Right, my question was more regarding the possibility to just extract the entries of PHP error logs if it is all mixed with other types of logs in the same log storage.
José Filipe Lopes Santos - 2013-05-22 02:36:11 - In reply to message 8 from Manuel Lemos
this is bad cant show logs :-(
|