Skip to content

1.6.0

Compare
Choose a tag to compare
@matthewp matthewp released this 12 Oct 12:06
· 57 commits to main since this release

Logging

This now gives you full control over the Fastify logger via the logging options.

Note that these options must be serializable as they are built into the production bundle. By default the logger is set to true to enable basic logging.

import { defineConfig } from 'astro/config';
import fastify from '@matthewp/astro-fastify';

export default defineConfig({
  output: 'server',
  adapter: fastify({
    entry: new URL('./api/index.js', import.meta.url),

    logger: {
      level: 'info',
      file: '/path/to/file'
    }
  })
});