# log4js-extend

> log4js + line number

Latest version **0.2.1** (published 2017-08-15) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install log4js-extend
pnpm add log4js-extend
yarn add log4js-extend
bun add log4js-extend
```

## 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.2.1 |
| Published | 2017-08-15 |
| First published | 2014-02-18 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 28 |
| Author | ww24 |
| Maintainers | ww24 |
| Keywords | logging, log, log4js |

## Links

- npm: https://www.npmjs.com/package/log4js-extend
- Repository: https://github.com/ww24/log4js-node-extend
- Issues: https://github.com/ww24/log4js-node-extend/issues
- npm.io page: https://npm.io/package/log4js-extend

## 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.2.1 (latest) — 2017-08-15
- 0.2.0 — 2017-08-15
- 0.1.2 — 2014-09-29
- 0.1.0 — 2014-02-18

## README

log4js-node-extend [![Build Status](https://secure.travis-ci.org/ww24/log4js-node-extend.png?branch=master)](http://travis-ci.org/ww24/log4js-node-extend) [![Dependency Status](https://gemnasium.com/ww24/log4js-node-extend.png)](https://gemnasium.com/ww24/log4js-node-extend)
==================

It add useful meta data of code (file-name, function-name line-number, column-number) for `log4js-node`.

Example
---------
```
[2014-02-18 12:24:14.238] [INFO] category - test at <anonymous> (test.js:57:9)
```

Installation
---------
```
npm install log4js-extend
```

Usage
---------
```js
const log4js = require("log4js");
const log4js_extend = require("log4js-extend");

log4js_extend(log4js, {
  path: __dirname,
  format: "at @name (@file:@line:@column)"
});

const logger = log4js.getLogger("category");
logger.info("test");
```

Options
---------
### path
Use relative path from path directory.

default: `null`

### format
Simple log format.

default: `"at @name (@file:@line:@column)"`

#### Keywords will replace as below.
* @name : function name
* @file : file name
* @line : line number
* @column : column number

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