Files
cloud-code/claude-code-source/node_modules/@azure/logger/dist/esm/index.js
janlaywss a192e187e8 fix: keep only source-map extracted node_modules, exclude pnpm artifacts
Restore node_modules to exact state from cli.js.map extraction:
- Move .ignored/ and .ignored_* files back to original package paths
- Remove pnpm symlinks (replaced by real source-map directories)
- Update .gitignore: only exclude /dist/, .pnpm/, .bin/, .ignored* dirs
- All package dist/ folders are now preserved as part of source-map files

After clone, run `pnpm install` to get pnpm-managed symlinks for building.
The committed node_modules contains the original TypeScript/JS source files
as bundled in cli.js.
2026-03-31 21:09:32 +08:00

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