UNPKG

@thomkjel/logger

Version:

Security-focused event logging library for Next.js applications (Work in Progress)

49 lines (48 loc) 1.45 kB
import React, { ReactNode } from 'react'; import { LogMetadata } from './types'; export interface AutoTrackerConfig { apiLogging?: boolean; authLogging?: boolean; errorLogging?: boolean; navigationLogging?: boolean; captureUserAgent?: boolean; captureIPAddress?: boolean; excludeRoutes?: string[]; includeOnlyRoutes?: string[]; customEventFilter?: (eventType: string, metadata: LogMetadata) => boolean; batchEvents?: boolean; flushInterval?: number; } interface SecurityLoggerProps { children: ReactNode; config?: AutoTrackerConfig; apiKey?: string; disabled?: boolean; } export declare function SecurityLogger({ children, config, apiKey, disabled }: SecurityLoggerProps): React.JSX.Element; export declare const SecurityLoggerPresets: { minimal: { apiLogging: boolean; authLogging: boolean; errorLogging: boolean; navigationLogging: boolean; }; standard: { apiLogging: boolean; authLogging: boolean; errorLogging: boolean; navigationLogging: boolean; captureUserAgent: boolean; }; comprehensive: { apiLogging: boolean; authLogging: boolean; errorLogging: boolean; navigationLogging: boolean; captureUserAgent: boolean; captureIPAddress: boolean; batchEvents: boolean; flushInterval: number; }; }; export default SecurityLogger;