Skip to content

Add structured logging via @azure/logger #31

Description

@daviburg

Context

The Node SDK has zero logging throughout its infrastructure layer — ConnectorHttpClient, ConnectorClientBase, and all generated clients are completely silent. The .NET SDK logs via the Azure.Core pipeline automatically at Info (request start), Info (response received), and Warning (retry attempts).

Proposed change

Add @azure/logger with the azure:connectors: prefix namespace:

import { createClientLogger } from "@azure/logger";

const logger = createClientLogger("connectors");

// In ConnectorHttpClient.sendAsync():
logger.info(`→ ${method} ${url}`);
// On response:
logger.info(`← ${response.status} ${method} ${url} (${elapsed}ms)`);
// On retry:
logger.warning(`Retry ${attempt}/${maxRetries} for ${method} ${url} after ${delay}ms`);
// On error:
logger.error(`${method} ${url} failed: ${error.message}`);

Consumers opt in to log output by setting:

AZURE_LOG_LEVEL=info   # or verbose, warning, error

This is a non-breaking additive change and can be shipped independently of the other infrastructure issues.

Azure SDK guideline

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions