mirror of
https://git.stamm.me/OpenServer/NodeLogging.git
synced 2024-11-14 06:41:05 +00:00
Modifying readme.md for new structure
This commit is contained in:
parent
72f06a88d6
commit
03cc58d3e1
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@hibas123/nodelogging",
|
||||
"version": "1.6.0-alpha.1",
|
||||
"version": "1.6.0-alpha.2",
|
||||
"description": "",
|
||||
"main": "out/index.js",
|
||||
"types": "out/index.d.ts",
|
||||
|
12
readme.md
12
readme.md
@ -1,4 +1,8 @@
|
||||
Simple logging module, that supports terminal coloring and writing to files
|
||||
Simple logging module, that supports terminal coloring and writing to files.
|
||||
|
||||
This module build ontop of [@hibas123/logging](https://www.npmjs.com/package/@hibas123/utils).
|
||||
|
||||
It extends the default behavior to support Logging to Files out of the Box.
|
||||
|
||||
# Getting Started
|
||||
|
||||
@ -27,10 +31,10 @@ All Logging types except the simple error take as many arguments as you want. Th
|
||||
|
||||
NodeLogging can work without any configuration, but it may be useful to change the log output folder.
|
||||
|
||||
Todo so you are capable of creating own instances of the LoggingBase class
|
||||
Todo so you are capable of creating own instances of the LoggingExtended class
|
||||
|
||||
``` javascript
|
||||
const CustomLogging = new LoggingBase(name | {
|
||||
const CustomLogging = new LoggingExtended(name | {
|
||||
name: "custom", // default undefined
|
||||
files: true | false | { //default true
|
||||
logfile: "./logs/test.log",
|
||||
@ -52,7 +56,7 @@ To not use any logfiles just set files to false.
|
||||
There is a new Plugin API available, that makes is possible to add custom Logging Adapter.
|
||||
|
||||
``` javascript
|
||||
const Demo = new LoggingBase("Demo");
|
||||
const Demo = new LoggingExtended("Demo");
|
||||
Demo.addAdapter(new DemoAdapter({ color: "rainbow" }));
|
||||
```
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user