@tigorhutasuhut/telemetry-js - v0.7.3
    Preparing search index...

    Function createLogger

    • Create a structured Logger.

      Parameters

      • OptionalserviceName: string

        Optional service name included in log output. When omitted the OTLP exporter's resource attributes (e.g. service.name) are used instead — this is the recommended approach so that the service name is configured in a single place.

        Dual output:

        1. Stderr — pino (Node + pino installed), built-in formatter (Node without pino), or console[level] (Cloudflare Workers).
        2. OTLP — emits via the global LoggerProvider if one is registered.

        Every method is wrapped in try-catch — never throws.

      Returns Logger