You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bref/Logger is a lightweight [PSR-3](https://www.php-fig.org/psr/psr-3/) logger for AWS Lambda. Messages are sent to stderr so that they end up in [CloudWatch](https://bref.sh/docs/environment/logs.html).
6
+
Bref/Logger is a lightweight [PSR-3](https://www.php-fig.org/psr/psr-3/) logger for AWS Lambda. Messages are sent to `stderr` so that they end up in [CloudWatch](https://bref.sh/docs/environment/logs.html).
7
7
8
8
## Why?
9
9
10
-
As explained in [the Bref documentation](https://bref.sh/docs/environment/logs.html), logging in AWS Lambda means logging to stderr. Logs written to stderr are automatically sent to CloudWatch, AWS' solution to collect and view logs.
10
+
As explained in [the Bref documentation](https://bref.sh/docs/environment/logs.html), logging in AWS Lambda means logging to `stderr`. Logs written to `stderr` are automatically sent to [CloudWatch](https://aws.amazon.com/cloudwatch/), AWS' solution to collect and view logs.
11
11
12
-
While classic loggers like [Monolog](https://github.com/Seldaek/monolog) work fine, this logger comes as a simpler and lighter alternative. It does not require any configuration and currently contains a single class.
12
+
While classic loggers like [Monolog](https://github.com/Seldaek/monolog) work fine, this logger comes as a simpler and lighter alternative optimized for AWS Lambda. It does not require any configuration and currently contains a single class.
13
13
14
14
Since it is [PSR-3](https://www.php-fig.org/psr/psr-3/) compliant, Bref/Logger is also compatible with any framework or library consuming a PSR-3 logger.
15
15
@@ -43,7 +43,9 @@ $logger->error('This is an error');
43
43
[ERROR] This is an error
44
44
```
45
45
46
-
[PSR-3 placeholders](https://www.php-fig.org/psr/psr-3/#12-message) can be used to insert information into a message without having to concatenate strings manually:
46
+
### Message placeholders
47
+
48
+
[PSR-3 placeholders](https://www.php-fig.org/psr/psr-3/#12-message) can be used to insert information from the `$context` array into the message without having to concatenate strings manually:
47
49
48
50
```php
49
51
$logger->warning('Invalid login attempt for email {email}', [
0 commit comments