> I think you can just use other PSR compliant logger, rather than using
the PsrBatchLogger on your local machine.
Could you give me some examples for other PSR compliant logger?
> Is this happening on App Engine Flex production server, or locally? ....
It's on App Engine Flex production server. (I used my project id instead of
'app', but it still complains, what's appropriate way to set the name? just
'app' or 'projects/project-id/log/ID' as suggested?
my code:
$batchLogger = new PsrBatchLogger('app'); // logName `app`, tried both
'app' and 'my-project-id'
$batchLogger->log(LogLevel::DEBUG, 'This is a debug log');
$batchLogger->debug('This is a debug log'); // The same thing
> The new logging library will automatically add some useful metadata
(monitored resources, trace id, severity). They look very nice to me on the
logging UI, but what do you mean exactly by making the format pretty?
I mean there are a lot of logging separated in multiple lines (as following
example) rather than list under a request like your screenshot.
- 2017/05/31 04:19:51 [error] 51#0: *1586 FastCGI sent in stderr: "PHP
message: [INFO] Array
- (
- [deviceId] => 0...C
- [key] => 6....4
- [userId] => 1602
- )
On Thursday, May 25, 2017 at 3:36:25 PM UTC-7, Yao Li wrote:
>
> I have an app is built on GAE Flex Custom env (GCloud PHP Ngnix docker image
> based), I want to improve the application logging format.
>
>
> How can I make the application log format better (more readable, with
> timestamp, POST/GET method name, status code (200), size (22 B), time (4ms),
> browser(chrome) in one line, put stack trace together instead of multiple
> lines now) like GAE logging format?
>
>
> All of the following logs are from Google Cloud Platform Console, Logging
> page/tab.
>
>
>
> (GAE default logging:)
>
>
> 15:21:23.667POST20022 B4 msChrome 56/User/isHuman
>
>
> (my application log, I want to collect following lines into one part like
> above default one rather than multi lines:)
>
>
> 15:21:27.0002017/05/25 22:21:27 [error] 23#23: *34128 FastCGI sent in stderr:
> "PHP message: [WARN] jsVersion does not match:3617 3623
>
> 15:21:27.000 Stack Trace:
>
> 15:21:27.000Array
>
> 15:21:27.000(
>
> 15:21:27.000[0] => Array
>
>
--
You received this message because you are subscribed to the Google Groups
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit
https://groups.google.com/d/msgid/google-appengine/366a25f6-6fd1-47ae-b4fb-bb6f5cbe7982%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.