# db_level_logger

> Database level log store in system

Latest version **1.0.0** (published 2022-01-20) · ISC license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2022-01-20 |
| First published | 2022-01-20 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 4.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | idea2code by Hardik |
| Maintainers | hard_miand |

## Links

- npm: https://www.npmjs.com/package/db_level_logger
- Repository: https://github.com/mh-i2c/db_level_logger
- Homepage: https://github.com/mh-i2c/db_level_logger#readme
- Issues: https://github.com/mh-i2c/db_level_logger/issues
- npm.io page: https://npm.io/package/db_level_logger

## Dependencies (1)

- [oracledb](https://npm.io/package/oracledb.md) ^5.3.0

## Recent versions

- 1.0.0 (latest) — 2022-01-20

## README

Database level log in to system

## Installing

Using npm:

```bash
$ npm install db_level_logger
```

Using bower:

```bash
$ bower install db_level_logger
```

Using yarn:

```bash
$ yarn add db_level_logger
```

## Important Note
You have to make sure that , you have to use this package before calling and APIs on server.

## Way of Use

### note: CommonJS usage

In order to gain the CommonJS imports with `require()` use the following approach:

```js
const express = require("express");
const server =express(); 
const port =3000 // Entered you port
const dbLogs = require("db_level_logger");

// Database connection function and process 
// After this connection process pass connection object into dbLogs 

// Database connection sample code

// Database connection
const oracleDB = require("oracledb");
let conn;

const dbConnection = async () => {
    try {
        oracleDB.initOracleClient({
            libDir: "libDir"
        });
        conn = await oracleDB.createPool({
            user: 'USERNAME',
            password: 'PASSWORD',
            connectString: 'HOST:PORT/DATABASE',
        })
        const result = await conn.getConnection();
        console.log("Successfully connected to Oracle!");
        return result;
    } catch (error) {
        console.log(error)
    }
}
const connection = dbConnection().then(conn => { return conn; });

// You need to pass table name and connection object for store data into table
server.use(dbLogs("Table",connection))

server.listen(port, () => console.log(`listening on port ${port}!`));

```

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