changelog for logger
This commit is contained in:
parent
e635660a87
commit
096281db93
1 changed files with 20 additions and 0 deletions
20
.changeset/twelve-baboons-obey.md
Normal file
20
.changeset/twelve-baboons-obey.md
Normal file
|
@ -0,0 +1,20 @@
|
|||
---
|
||||
'astro': minor
|
||||
---
|
||||
|
||||
Astro integrations now accept a logger. The logger is available to all hooks as
|
||||
an additional parameter:
|
||||
|
||||
```js
|
||||
// integration.js
|
||||
export function myIntegration(): AstroIntegration {
|
||||
return {
|
||||
name: "my-integration",
|
||||
hooks: {
|
||||
"astro:config:done": (options, { logger }) => {
|
||||
logger.info("Configure integration...");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
Loading…
Add table
Reference in a new issue