An open API service indexing awesome lists of open source software.

https://github.com/avash027/mini-mongo-logger

Add a really simple, lightweight and easy to use logger to your next MERN stack web application with just 2 lines of code.
https://github.com/avash027/mini-mongo-logger

express logger logging node nodejs simple

Last synced: 2 months ago
JSON representation

Add a really simple, lightweight and easy to use logger to your next MERN stack web application with just 2 lines of code.

Awesome Lists containing this project

README

          

Welcome to mini-mongo-logger 👋




Version


Documentation


Maintenance

License: MIT

> Add a really simple, lightweight and easy to use logger to your next MERN stack web application with just 2 lines of code.

### ✨ [NPM](https://www.npmjs.com/package/mini-mongo-logger)

## How to use

```js
const { initialize } = require("mini-mongo-logger");

initialize({
production: process.env.NODE_ENV === "production",
url: "Your mongodb url to store logs in your database",
});
```

## Install

```sh
npm install
```

Now you can use logger in your server

```js
const { logger } = require("mini-mongo-logger");
```

## Log types

```js
logger.success("success");
logger.warn("warn");
logger.error("error");
logger.info("info");
logger.other("other");
```

## Author

👤 **Avash Mitra**

- Website: https://www.linkedin.com/in/avash-mitra/
- Github: [@Avash027](https://github.com/Avash027)
- LinkedIn: [@avash-mitra](https://linkedin.com/in/avash-mitra)

## 🤝 Contributing

Contributions, issues and feature requests are welcome!
Feel free to check [issues page](https://github.com/Avash027/mini-mongo-logger/issues). You can also take a look at the [contributing guide](https://github.com/Avash027/mini-mongo-logger/blob/master/CONTRIBUTING.md).

## Show your support

Give a ⭐️ if this project helped you!

## 📝 License

Copyright © 2022 [Avash Mitra](https://github.com/Avash027).

This project is [MIT](https://github.com/Avash027/mini-mongo-logger/blob/master/LICENSE) licensed.

---

_This README was generated with ❤️ by [readme-md-generator](https://github.com/kefranabg/readme-md-generator)_