Interface Options

Options for configuring the logger.

interface Options {
    discordWebhook?: string;
    file?: {
        fileFormat?: "log" | "txt";
        flags?: string;
        includeDateInFilename?: boolean;
        messageFormat?: "DATE | LEVEL | CONTEXT | MESSAGE" | "DATE - LEVEL | CONTEXT | MESSAGE" | "DATE | CONTEXT | MESSAGE" | "DATE - CONTEXT | MESSAGE" | "DATE | MESSAGE" | "DATE - MESSAGE";
        path: string;
    };
    sentry?: {
        dsn: string;
        environment: string;
        integrations?: any[];
        tracesSampleRate: number;
    };
    telegram?: {
        chatId: string;
        token: string;
    };
}

Hierarchy (view full)

Properties

discordWebhook?: string

The Discord webhook URL.

Default

undefined

Example

'https://discord.com/api/webhooks/...'
file?: {
    fileFormat?: "log" | "txt";
    flags?: string;
    includeDateInFilename?: boolean;
    messageFormat?: "DATE | LEVEL | CONTEXT | MESSAGE" | "DATE - LEVEL | CONTEXT | MESSAGE" | "DATE | CONTEXT | MESSAGE" | "DATE - CONTEXT | MESSAGE" | "DATE | MESSAGE" | "DATE - MESSAGE";
    path: string;
}

Options for the file emitter.

Type declaration

  • Optional fileFormat?: "log" | "txt"
  • Optional flags?: string
  • Optional includeDateInFilename?: boolean
  • Optional messageFormat?: "DATE | LEVEL | CONTEXT | MESSAGE" | "DATE - LEVEL | CONTEXT | MESSAGE" | "DATE | CONTEXT | MESSAGE" | "DATE - CONTEXT | MESSAGE" | "DATE | MESSAGE" | "DATE - MESSAGE"
  • path: string

Default

undefined

Example

{ path: './logs', includeDateInFilename: true, fileFormat: 'log', messageFormat: 'DATE - LEVEL | CONTEXT | MESSAGE' }
sentry?: {
    dsn: string;
    environment: string;
    integrations?: any[];
    tracesSampleRate: number;
}

Options for Sentry integration.

Type declaration

  • dsn: string
  • environment: string
  • Optional integrations?: any[]
  • tracesSampleRate: number
telegram?: {
    chatId: string;
    token: string;
}

Options for the Telegram bot.

Type declaration

  • chatId: string
  • token: string

Default

undefined

Example

{ token: '..', chatId: '123456789' }

Generated using TypeDoc