- Extract 4756 source files from cli.js.map (57MB) - Set up Bun build system with bun:bundle feature flag shim - Configure 90+ compile-time feature flags matching production defaults - Inject MACRO constants (VERSION, BUILD_TIME, etc.) - Create stubs for private packages (color-diff-napi, modifiers-napi, etc.) - Install all public dependencies via pnpm - Patch commander v14 to allow multi-char short flags (-d2e) - Build output: dist/cli.js (22MB), verified working
40 lines
1.2 KiB
JavaScript
40 lines
1.2 KiB
JavaScript
// Copyright (c) Microsoft Corporation.
|
|
// Licensed under the MIT License.
|
|
import { createLoggerContext } from "@typespec/ts-http-runtime/internal/logger";
|
|
const context = createLoggerContext({
|
|
logLevelEnvVarName: "AZURE_LOG_LEVEL",
|
|
namespace: "azure",
|
|
});
|
|
/**
|
|
* The AzureLogger provides a mechanism for overriding where logs are output to.
|
|
* By default, logs are sent to stderr.
|
|
* Override the `log` method to redirect logs to another location.
|
|
*/
|
|
export const AzureLogger = context.logger;
|
|
/**
|
|
* Immediately enables logging at the specified log level. If no level is specified, logging is disabled.
|
|
* @param level - The log level to enable for logging.
|
|
* Options from most verbose to least verbose are:
|
|
* - verbose
|
|
* - info
|
|
* - warning
|
|
* - error
|
|
*/
|
|
export function setLogLevel(level) {
|
|
context.setLogLevel(level);
|
|
}
|
|
/**
|
|
* Retrieves the currently specified log level.
|
|
*/
|
|
export function getLogLevel() {
|
|
return context.getLogLevel();
|
|
}
|
|
/**
|
|
* Creates a logger for use by the Azure SDKs that inherits from `AzureLogger`.
|
|
* @param namespace - The name of the SDK package.
|
|
* @hidden
|
|
*/
|
|
export function createClientLogger(namespace) {
|
|
return context.createClientLogger(namespace);
|
|
}
|
|
//# sourceMappingURL=index.js.map
|