# hardhat-log-remover

> Remove Hardhat console.log imports and calls from Solidity source files

Latest version **2.1.1** (published 2024-06-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install hardhat-log-remover
pnpm add hardhat-log-remover
yarn add hardhat-log-remover
bun add hardhat-log-remover
```

## Health

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

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 2.1.1 |
| Published | 2024-06-21 |
| First published | 2020-10-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 14 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 15 |
| Author | Nick Barry |
| Keywords | harhat, buidler, solidity, smart-contracts, console, log, console.log, ethereum, blockchain, wow |

## Links

- npm: https://www.npmjs.com/package/hardhat-log-remover
- Repository: https://github.com/ItsNickBarry/hardhat-log-remover
- npm.io page: https://npm.io/package/hardhat-log-remover

## Alternatives

- [cli-color](https://npm.io/package/cli-color.md) — 3.4M weekly downloads
- [log](https://npm.io/package/log.md) — 1.3M weekly downloads
- [logstash-client](https://npm.io/package/logstash-client.md) — 4.5K weekly downloads
- [@nocobase/plugin-logger](https://npm.io/package/@nocobase/plugin-logger.md) — 2.0K weekly downloads
- [child-process-debug](https://npm.io/package/child-process-debug.md) — 695 weekly downloads

## Recent versions

- 2.1.1 (latest) — 2024-06-21
- 2.1.0 — 2024-06-20
- 2.0.2 — 2021-05-14
- 2.0.1 — 2021-04-05
- 2.0.0 — 2020-10-23

## README

# Hardhat Log Remover

Remove Hardhat `console.log` imports and calls from Solidity source code.

This plugin is intended in part to keep version-controlled code free of log statements. To remove logs from compiled contracts while preserving them in source code, see [hardhat-preprocessor](https://github.com/wighawag/hardhat-preprocessor).

> Versions of this plugin prior to `2.0.0` were released as `buidler-log-remover`.

## Installation

```bash
npm install --save-dev hardhat-log-remover
# or
yarn add --dev hardhat-log-remover
```

## Usage

Load plugin in Hardhat config:

```javascript
require('hardhat-log-remover');
```

Run the Hardhat task manually:

```bash
npx hardhat remove-logs
```

# or

```bash
yarn run hardhat remove-logs
```

Before removing logs, the plugin will ensure that all contracts can be compiled successfully.

## Development

Install dependencies via Yarn:

```bash
yarn install
```

Setup Husky to format code on commit:

```bash
yarn prepare
```

---
_Source: https://npm.io/package/hardhat-log-remover · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
