# memorandum

> Simple logging utility with all the bells and whistles

Latest version **0.1.2** (published 2015-05-04) · MIT license · 0 weekly downloads

## Install

```sh
npm install memorandum
pnpm add memorandum
yarn add memorandum
bun add memorandum
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.2 |
| Published | 2015-05-04 |
| First published | 2014-09-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 (+2 in 1 direct dependencies) |
| Install scripts | no |
| Author | Diogo Resende |
| Maintainers | dresende |
| Keywords | log, memo |

## Links

- npm: https://www.npmjs.com/package/memorandum
- Repository: https://github.com/dresende/memorandum
- Issues: https://github.com/dresende/memorandum/issues
- npm.io page: https://npm.io/package/memorandum

## Dependencies (3)

- [ansi](https://npm.io/package/ansi.md) 0.3.x
- [traceback](https://npm.io/package/traceback.md) 0.3.x
- [moment-timezone](https://npm.io/package/moment-timezone.md) 0.3.x

## 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

- 0.1.2 (latest) — 2015-05-04
- 0.1.1 — 2015-05-04
- 0.1.0 — 2014-09-02
- 0.0.0 — 2014-09-01

## README

## Memorandum

[![](https://badge.fury.io/js/memorandum.svg)](https://npmjs.org/package/memorandum)
[![](https://gemnasium.com/dresende/node-memorandum.png)](https://gemnasium.com/dresende/node-memorandum)

Simple logging utility with all the bells and whistles.

### Features

- color output (if output supports it) using ANSI codes
- timestamp (with timezone support, defaults to local)
- prettyprint JSON objects
- error traces

### Install

```sh
npm install memorandum
```

### Usage

```js
var log = require("memorandum")();

log.info("this is an information message");
log.warn("this is a warning message");
log.error(new TypeError());
log.debug("this is a debug message");
log.debug({ x: 1 });
log.debug({ x: 2 }, "other debug object");
```

### Constructor

When creating the log you can pass an optional `module id` to the constructor. This will show up in the log.

```js
var log = require("memorandum")("my module");

log.info("log message");
//   2014-09-02 17:22:00  my module  info: log message
```

### Methods

These are the methods available to log messages.

- **info**: display information messages
- **warn**: display warning messages
- **error**: display errors (with trace)
- **debug**: display debug messages or objects (as JSON)

### Settings

Settings can be changed globally. They allow you to tweak some parts of the log output.

```js
var memorandum = require("memorandum");

// default settings:
memorandum.settings.timestamp.timezone = null; // MomentJS timezone (null = local)
memorandum.settings.timestamp.format = "YYYY-MM-DD HH:mm:ss.SSS"; // MomentJS format
```

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