File tree Expand file tree Collapse file tree 2 files changed +3
-6
lines changed
Expand file tree Collapse file tree 2 files changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -13,8 +13,8 @@ these two steps:
13131 . Create a [ PSR-3] [ psr3 ] -compatible logger object
1414 ``` php
1515 use Google\Cloud\Logging\LoggingClient;
16- $logging = new LoggingClient();
17- $logger = $logging->psrLogger ('app', ['batchEnabled' => true] );
16+ // Create a PSR-3-Compatible logger
17+ $logger = LoggingClient::psrBatchLogger ('app');
1818 ```
1919
2020Now you can happily log anything you'd like, and they will show up on
Original file line number Diff line number Diff line change 1818
1919use Google \Cloud \Logging \LoggingClient ;
2020
21- // Create the logging client
22- $ logging = new LoggingClient ();
23-
2421// Create a PSR-3-Compatible logger
25- $ logger = $ logging -> psrLogger ('app ' , [ ' batchEnabled ' => true ] );
22+ $ logger = LoggingClient:: psrBatchLogger ('app ' );
2623
2724// Log messages with varying log levels.
2825$ logger ->info ('This will show up as log level INFO ' );
You can’t perform that action at this time.
0 commit comments