Skip to content

Commit 11aa29b

Browse files
authored
Simplifies logging quickstart (GoogleCloudPlatform#893)
1 parent 943184d commit 11aa29b

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

logging/quickstart.php

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,19 +30,14 @@
3030
'projectId' => $projectId
3131
]);
3232

33-
# The name of the log to write to
34-
$logName = 'my-log';
35-
3633
# Selects the log to write to
37-
$logger = $logging->logger($logName);
34+
$logger = $logging->logger('my-log');
3835

3936
# The data to log
4037
$text = 'Hello, world!';
4138

42-
# Creates the log entry
39+
# Creates and writes the log entry
4340
$entry = $logger->entry($text);
44-
45-
# Writes the log entry
4641
$logger->write($entry);
4742

4843
echo 'Logged ' . $text;

0 commit comments

Comments
 (0)