Skip to content

Commit d4bc6ce

Browse files
ronits2407ArmandPhilippotematipicoyanthomasdev
authored
feat: document AstroComponentLogger type (#14203)
Co-authored-by: Armand Philippot <git@armand.philippot.eu> Co-authored-by: Emanuele Stoppa <my.burning@gmail.com> Co-authored-by: Yan <61414485+yanthomasdev@users.noreply.github.com>
1 parent 640df7d commit d4bc6ce

2 files changed

Lines changed: 11 additions & 1 deletion

File tree

src/content/docs/en/reference/api-reference.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1291,7 +1291,7 @@ Purges cached entries. Requires a configured cache provider.
12911291

12921292
<p>
12931293

1294-
**Type**: `object | undefined`
1294+
**Type**: [`AstroRuntimeLogger`](/en/reference/logger-reference/#astroruntimelogger)
12951295
<Since v="7.0.0" />
12961296
</p>
12971297

src/content/docs/en/reference/logger-reference.mdx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,16 @@ export default defineConfig({
204204

205205
The following types can be imported from the `astro` specifier.
206206

207+
### `AstroRuntimeLogger`
208+
209+
<p>
210+
211+
**Type:** `{ info: (message: string) => void; warn: (message: string) => void; error: (message: string) => void; }`<br />
212+
<Since v="7.0.8" />
213+
</p>
214+
215+
Describes the [`logger` methods available at runtime](/en/reference/api-reference/#logger) for adding additional logs during page rendering.
216+
207217
### `AstroLoggerDestination`
208218

209219
This is the interface that custom loggers must implement.

0 commit comments

Comments
 (0)