# @rnx-kit/console

> Simple console logger

Latest version **3.0.0** (published 2026-05-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install @rnx-kit/console
pnpm add @rnx-kit/console
yarn add @rnx-kit/console
bun add @rnx-kit/console
```

## Health

**Score 65/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; high maintenance score; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 3.0.0 |
| Published | 2026-05-13 |
| First published | 2021-06-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=20.18 |
| Dependencies | 0 |
| Unpacked size | 4.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1733 |
| Author | Microsoft Open Source |
| Maintainers | jasonvmorse, acoates, rnbot, tido64, rnsdkbot, hansenyy, microsoft-oss-releases, microsoft1es |

## Links

- npm: https://www.npmjs.com/package/@rnx-kit/console
- Repository: https://github.com/microsoft/rnx-kit
- Homepage: https://github.com/microsoft/rnx-kit/tree/main/packages/console#readme
- Issues: https://github.com/microsoft/rnx-kit/issues
- npm.io page: https://npm.io/package/@rnx-kit/console

## Recent versions

- 3.0.0 (latest) — 2026-05-13
- 2.0.0 — 2024-09-11
- 1.1.0 — 2024-04-09
- 1.0.13 — 2024-04-02
- 1.0.12 — 2023-09-13
- 1.0.11 — 2021-11-30
- 1.0.10 — 2021-11-18
- 1.0.9 — 2021-11-05
- 1.0.8 — 2021-11-05
- 1.0.7 — 2021-11-03
- 1.0.6 — 2021-11-01
- 1.0.5 — 2021-10-29
- 1.0.4 — 2021-10-29
- 1.0.3 — 2021-10-29
- 1.0.2 — 2021-08-04
- … 2 more at https://npm.io/package/@rnx-kit/console/versions

## README

# @rnx-kit/console

[![Build](https://github.com/microsoft/rnx-kit/actions/workflows/build.yml/badge.svg)](https://github.com/microsoft/rnx-kit/actions/workflows/build.yml)
[![npm version](https://img.shields.io/npm/v/@rnx-kit/console)](https://www.npmjs.com/package/@rnx-kit/console)

`@rnx-kit/console` is a simple console logger that is a subset of the logger in
[`@react-native-community/cli-tools`](https://github.com/react-native-community/cli/blob/6615eb30f37bec5bb25acc066c849c4aa2d8a4cd/packages/tools/src/logger.ts).
It is used by
[Metro plugins](https://github.com/microsoft/rnx-kit/tree/main/packages) to
ensure that log lines are consistent with `@react-native-community/cli`.

Ideally, we should be using the reporter that is passed to Metro but we don't
have access to it from the `customSerializer` hook. The next best thing would be
to use `@react-native-community/cli-tools` but it includes a bunch of other
tools and we cannot take a dependency on any single version since we need to
support multiple versions of `react-native` (and hence multiple versions of
`@react-native-community/cli-tools`).

Other libraries, such as
[`just-task-logger`](https://github.com/microsoft/just/tree/master/packages/just-task-logger),
were also considered. However, the purpose of this package is to match with the
output of `@react-native-community/cli`. `just-task-logger` in particular uses
its own colour scheme and doesn't allow configuring them to match the colour
scheme.

## Install

```sh
yarn add @rnx-kit/console --dev
```

## Usage

```ts
import { error, info, warn } from "@rnx-kit/console";

error("This is an error message");
info("This is an informational message");
warn("This is a warning");
```

---
_Source: https://npm.io/package/@rnx-kit/console · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
