# @colucom/osseus-logger

> Osseus logger

Latest version **0.5.3** (published 2020-12-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install @colucom/osseus-logger
pnpm add @colucom/osseus-logger
yarn add @colucom/osseus-logger
bun add @colucom/osseus-logger
```

## 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.5.3 |
| Published | 2020-12-28 |
| First published | 2018-09-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 12.1 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 1 |
| Author | LiorRabin |
| Maintainers | liorrabin, grebenaha, valery-colu, leonprou, quilamir, rottev |

## Links

- npm: https://www.npmjs.com/package/@colucom/osseus-logger
- Repository: https://github.com/colucom/osseus-logger
- Homepage: https://github.com/colucom/osseus-logger#readme
- Issues: https://github.com/colucom/osseus-logger/issues
- npm.io page: https://npm.io/package/@colucom/osseus-logger

## Dependencies (3)

- [aws-sdk](https://npm.io/package/aws-sdk.md) ^2.275.1
- [winston](https://npm.io/package/winston.md) ~3.1.0
- [console-log-level](https://npm.io/package/console-log-level.md) ^1.4.0

## Recent versions

- 0.5.3 (latest) — 2020-12-28
- 0.5.2 — 2019-01-27
- 0.5.1 — 2018-10-24
- 0.5.0 — 2018-09-27

## README

[![JavaScript Style Guide](https://cdn.rawgit.com/standard/standard/master/badge.svg)](https://github.com/standard/standard)

# Osseus Logger

[winston](https://github.com/winstonjs/winston) based osseus logger module

## Install
```bash
$ npm install @colucom/osseus-logger
```

## Usage

#### Configuration
* `OSSEUS_LOGGER_LOG_LEVEL`
	* Mandatory. See [Winston Logging Levels](https://github.com/winstonjs/winston#logging-levels)
	* Default log levels:
		* DEV environment - `silly`
		* QA environment - `debug`
		* PROD envrionment - `info`
* `OSSEUS_LOGGER_NO_CONSOLE_OVERRIDE`
	*  Optional. Set to true if you wish to disable `console` override

***Note: `console` override***

* `console.debug` ==> `logger.debug`
* `console.log` ==> `logger.debug`
* `console.info` ==> **no override!** can be used to bypass logger functionality
* `console.warn` ==> `logger.warn`
* `console.error` ==> `logger.error`

#### Example
First, create `index.js`:

```javascript
const Osseus = require('osseus')

const main = async () => {
	try {
		// init osseus
		const osseus = await Osseus.init()
		// option #1
		osseus.logger.debug(`hello logger`)
		// option #2
		console.log(`hello logger`)
  	} catch (err) {
		console.error(err)
  	}
}

main()

```

Running:

```bash
$ node index.js --OSSEUS_LOGGER_LOG_LEVEL 'debug'
```

Will result in:

```sh
2018-06-21T12:38:15.650Z - debug: (Liors-MacBook-Pro.local) (63287) - hello logger
2018-06-21T12:38:15.650Z - debug: (Liors-MacBook-Pro.local) (63287) - hello logger
```

## Contributing
Please see [contributing guidelines](https://github.com/colucom/osseus-logger/blob/master/.github/CONTRIBUTING.md).

## License
Code released under the [MIT License](https://github.com/colucom/osseus-logger/blob/master/LICENSE).

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