# blg

> broswer logger

Latest version **0.0.5** (published 2016-06-21) · 0 weekly downloads

## Install

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

## 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.0.5 |
| Published | 2016-06-21 |
| First published | 2016-06-17 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Author | cswleocsw |
| Maintainers | cswleocsw |

## Links

- npm: https://www.npmjs.com/package/blg
- Repository: https://github.com/cswleocsw/blg
- Homepage: https://github.com/cswleocsw/blg#readme
- Issues: https://github.com/cswleocsw/blg/issues
- npm.io page: https://npm.io/package/blg

## Dependencies (2)

- [uuid](https://npm.io/package/uuid.md) ^2.0.2
- [filesaverjs](https://npm.io/package/filesaverjs.md) ^0.2.2

## Recent versions

- 0.0.5 (latest) — 2016-06-21
- 0.0.4 — 2016-06-21
- 0.0.3 — 2016-06-21
- 0.0.2 — 2016-06-17

## README

# blg [![Build Status](https://travis-ci.org/cswleocsw/blg.svg?branch=master)](https://travis-ci.org/cswleocsw/blg)
A browser logger tool.

## features
 - error handle
 - offline storage
 - debug mode (console.log)
 - transform to local text file

## TODO
- remote server(Use for receive log content from client) 

## USE
```
// get logger instance
let log = BLG.create('#index')

// levels: [info, error, warn] 
// log with level of info
log.info(new Date(), 'log something text content')

// get logs

// array
log.dump() // return ["[#index] INFO "2016-06-21T08:54:33.571Z" log something text content"]

// get all logs.
BLG.dump()

// get all logs with a text file
BLG.save()


// custom log content
log.decorate((name, level, text) => [ moment().format('YYYY-MM-DD HH:mm:ss'), name, level, text ]) // "2016-06-21 17:14:48 #index,INFO,message 2"  

// another custorm method...
// NOTE: arguemnts is change!
log.decorate((date,name, level, text) => [ date, `[${name}]`, level, text ]) // "2016-06-21 17:14:48 [#index],INFO,message 2"  

```

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