0.5.1 • Published 6 months ago

@inox-tools/runtime-logger v0.5.1

Weekly downloads
-
License
MIT
Repository
-
Last release
6 months ago

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.

0.3.6

11 months ago

0.3.5

11 months ago

0.5.0

6 months ago

0.4.1

10 months ago

0.4.0

11 months ago

0.5.1

6 months ago

0.4.2

9 months ago

0.3.5-beta.0

12 months ago

0.3.2

1 year ago

0.3.4

1 year ago

0.3.3

1 year ago

0.3.1

1 year ago

0.3.0

1 year ago

0.2.1

1 year ago

0.2.0

1 year ago

0.1.0

1 year ago