I'm testing a PHP application at my computer using the app_server launched by "Google App Engine Launcher".
But, at its logs, I am not seeing the output from the syslogs that are inserted at my PHP code.
I've tried the parameters --log_level and --dev_appserver_log_level without any success.
Do anybody knows what can be done?
My Google App Engine Launcher is version 1.8.6.
The default configuration should have syslogging enabled so no additional parameters should be necessary when launching app_server. Could you execute a very simple test script and post the output?
<?php
print 'Using syslog() '. (syslog(LOG_DEBUG, 'Testing syslog() functionality') ? 'succeeded' : 'failed');
After executing the above script and getting a positive result message you should find at least one entry in your local syslog.
If you want to read the logs programmatically (source [1]):
you can iterate over messages added by syslog()
using AppEngine's LogService
API:
use google\appengine\api\log\LogService;
use google\appengine\util as util;
$start = (float) $_GET["start"];
$end = (float) $_GET["end"];
$options = [
'start_time' => $start * 1e6,
'end_time' => $end * 1e6,
'include_app_logs' => true
];
$logs = LogService::fetch($options);
[1] https://developers.google.com/appengine/docs/php/logs/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With