Amplify CLI Logger v1.2.3 is a logging utility internal to the AWS Amplify CLI ecosystem. It provides structured logging for Amplify CLI commands and plugins, with support for multiple log levels and output formatting. Released as part of the AWS Amplify CLI monorepo, it is tightly coupled to the Amplify CLI runtime and is not intended for standalone use. The package ships TypeScript types and is distributed via npm under the @aws-amplify scope. It is currently in active development alongside the Amplify CLI, with releases aligned to the CLI's major version (currently v14.x). Key differentiators include integration with Amplify CLI's context object and automatic log level configuration based on CLI verbosity settings.
npm install amplify-cli-loggerVerified import paths — ran on the pinned version, not inferred.
Shows creating a logger instance with configurable log level, logging messages at different levels including structured metadata, and proper cleanup.
Use import statements or dynamic import(). If you must use CommonJS, use a dynamic import wrapper: const { AmplifyLogger } = await import('@aws-amplify/amplify-cli-logger');Replace { level: LogLevel.INFO } with { logLevel: LogLevel.INFO }.Use getAmplifyLogger() factory function instead which properly initializes the logger with the current CLI context.
Change the import to use ESM syntax: import { AmplifyLogger } from '@aws-amplify/amplify-cli-logger'; Or use dynamic import: const { AmplifyLogger } = await import('@aws-amplify/amplify-cli-logger');Use named import: import { AmplifyLogger } from '@aws-amplify/amplify-cli-logger'; instead of default import.Use LogLevel instead: import { LogLevel } from '@aws-amplify/amplify-cli-logger';