JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 484
  • Score
    100M100P100Q102829F
  • License MIT

Expose Astro Integration Logger at runtime for consistent output

Package Exports

  • @inox-tools/runtime-logger

Readme

InoxTools

Runtime Logger

Expose Astro Integration Logger at runtime for consistent output

Install

npm i @inox-tools/runtime-logger

Using the integration

To enable this, you need to register your integration to have a runtime logger under some name:

import { runtimeLogger } from '@inox-tools/runtime-logger';

export default () => ({
  name: 'your-integration',
  hooks: {
    'astro:config:setup': (params) => {
      runtimeLogger(params, {
        name: 'your-integration',
      });
    },
  },
});

With that in place, your runtime code can now access the logger by importing the generated module @it-astro:logger:<name>:

---
import { logger } from '@it-astro:logger:your-integration';

logger.info('Hello World!');
---

License

Astro Runtime Logger is available under the MIT license.