Skip to content

Commit c36fc8f

Browse files
committed
Fix up README and configure markdownlint-in-ci
1 parent a9ea300 commit c36fc8f

File tree

2 files changed

+19
-14
lines changed

2 files changed

+19
-14
lines changed

.markdownlint-cli2.jsonc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
// markdownlint-cli2 configuration
3+
"config": {
4+
// Disable line length checking in code blocks
5+
"MD013": {
6+
"code_blocks": false
7+
}
8+
}
9+
}

README.md

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ Wrap your PSR-3 logger with context accumulation and callable context elements.
44

55
## Inspiration
66

7-
Inspired by the [similar functionality] in [pinojs]. Design and implementation
8-
details differ, but the core idea remains:
7+
Inspired by the [similar functionality] in [pinojs]. Design and implementation
8+
details differ, but the core idea remains:
99

1010
## Approach
1111

@@ -15,7 +15,7 @@ additional `withContext` and `addContext` methods defined in this library's
1515
[StackLogger interface](src/StackLogger.php).
1616

1717
Also provided is [`MonologStackLogger`](src/MonologStackLogger.php), which
18-
decorates a `Monolog\Logger` and provides a working `withName` implementation.
18+
decorates a `Monolog\Logger` and provides a working [`withName`] implementation.
1919

2020
## Usage
2121

@@ -46,7 +46,7 @@ $mainLogger->info("Still here, with no accumulated context!");
4646
// => [2020-10-17 17:40:53] app.INFO: Still here, with no accumulated context!
4747
```
4848

49-
This can be useful in any situation where want to carry some context through
49+
This can be useful in any situation where want to carry some context through
5050
successive calls.
5151

5252
```php
@@ -78,9 +78,9 @@ function complexProcessing(User $user, \TimDev\StackLogger\StackLogger $logger){
7878

7979
### Dynamic (Callable) Context
8080

81-
The other feature provided here is callable context. Any context elements that
82-
are `callable` will be invoked at logging-time, and the result of the
83-
computation will be logged. Callables take a single array argument:
81+
The other feature provided here is callable context. Any context elements that
82+
are `callable` will be invoked at logging-time, and the result of the
83+
computation will be logged. Callables take a single array argument:
8484
`function(array $context): mixed`
8585

8686
```php
@@ -120,15 +120,11 @@ class SomeService
120120

121121
## To Do
122122

123-
- [ ] Make MonologStackLogger implement Monolog's ResettableInterface?
124-
- [ ] Consider how this might play with Laravel, the insanely popular PHP
123+
- [ ] Make MonologStackLogger implement Monolog's ResettableInterface?
124+
- [ ] Consider how this might play with Laravel, the insanely popular PHP
125125
framework that I do my best to avoid. 😜
126126

127-
128-
129127
[similar functionality]: https://getpino.io/#/docs/child-loggers
130128
[pinojs]: https://github.com/pinojs/pino
131129
[PSR3 LoggerInterface]: https://www.php-fig.org/psr/psr-3/
132-
[monolog]: https://github.com/Seldaek/monolog
133-
[addRecord]: https://github.com/Seldaek/monolog/blob/a54cd1f1782f62714e4d28651224316bb5540e08/src/Monolog/Logger.php#L278-L336
134-
[withName]: https://github.com/Seldaek/monolog/blob/a54cd1f1782f62714e4d28651224316bb5540e08/src/Monolog/Logger.php#L163-L172
130+
[`withName`]: https://github.com/Seldaek/monolog/blob/a54cd1f1782f62714e4d28651224316bb5540e08/src/Monolog/Logger.php#L163-L172

0 commit comments

Comments
 (0)