How to use the @azure/logger.createClientLogger function in @azure/logger

To help you get started, we’ve selected a few @azure/logger examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Azure / azure-sdk-for-js / sdk / eventhub / event-hubs / src / log.ts View on Github external
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

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

/**
 * The @azure/logger configuration for this package.
 * This will output logs using the `azure:event-hubs` namespace prefix.
 */
export const logger = createClientLogger("event-hubs");

/**
 * Logs the error's stack trace to "verbose" if a stack trace is available.
 * @param error Error containing a stack trace.
 * @ignore
 */
export function logErrorStackTrace(error: any) {
  if (error && error.stack) {
    logger.verbose(error.stack);
  }
}
github Azure / azure-sdk-for-js / sdk / storage / storage-file-share / src / log.ts View on Github external
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

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

/**
 * The @azure/logger configuration for this package.
 */
export const logger = createClientLogger("storage-file-share");
github Azure / azure-sdk-for-js / sdk / core / core-amqp / src / log.ts View on Github external
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

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

/**
 * The @azure/logger configuration for this package.
 * This will output logs using the `azure:event-hubs` namespace prefix.
 */
export const logger = createClientLogger("core-amqp");

/**
 * Logs the error's stack trace to "verbose" if a stack trace is available.
 * @param error Error containing a stack trace.
 * @ignore
 */
export function logErrorStackTrace(error: any) {
  if (error && error.stack) {
    logger.verbose(error.stack);
  }
}

@azure/logger

Microsoft Azure SDK for JavaScript - Logger

MIT
Latest version published 4 months ago

Package Health Score

84 / 100
Full package analysis