# @nicholaskuchiniski/rn-logs

> React Native Logs

Latest version **1.0.2** (published 2023-04-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install @nicholaskuchiniski/rn-logs
pnpm add @nicholaskuchiniski/rn-logs
yarn add @nicholaskuchiniski/rn-logs
bun add @nicholaskuchiniski/rn-logs
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2023-04-10 |
| First published | 2023-04-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 10 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | nicholaskuchiniski |

## Links

- npm: https://www.npmjs.com/package/@nicholaskuchiniski/rn-logs
- Repository: https://github.com/nicholaskuchiniski/rn-logs
- Homepage: https://github.com/nicholaskuchiniski/rn-logs#readme
- Issues: https://github.com/nicholaskuchiniski/rn-logs/issues
- npm.io page: https://npm.io/package/@nicholaskuchiniski/rn-logs

## Dependencies (1)

- [lodash](https://npm.io/package/lodash.md) ^4.17.21

## Recent versions

- 1.0.2 (latest) — 2023-04-10
- 1.0.1 — 2023-04-09
- 1.0.0 — 2023-04-09

## README

# React Native Logs

See your logs from React Native on Flipper.

# Usage

First you need to install the *react-native* library with `yarn rn-logs` or `npm i rn-logs`, after that you just need to configure the logger before using it:

```tsx
import { configureLogger } from "rn-logs";

configureLogger({
  isEnabled: __DEV__
});
```

After configuring the logger, you can use it by creating a new instance of *Logger* anywhere in your app:

```tsx
import { Logger } from "rn-logs";
import { interval } from  "rxjs";

const pair = new Logger("pair");
const odd = new Logger("odd");

interval(1_000).subscribe(number => {
    number % 2 === 0
      ? pair.info('Number is pair', { number })
      : odd.warn('Number is odd', { number });
});
```

And you will be able to see the logs appearing once you have *Flipper* open (Go to [Releases](https://github.com/NicholasKuchiniski/rn-logs/releases) to download the plugin):

![Example](./images/example.png "Example")

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