Adding automatic logfile creation depending on name
This commit is contained in:
20
readme.md
20
readme.md
@ -25,13 +25,25 @@ All Logging types except the simple error take as many arguments as you want. Th
|
||||
|
||||
# Setup
|
||||
|
||||
NodeLogging can work without any configuration, but it may be useful to change the log output folder or disable the terminal output.
|
||||
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
|
||||
|
||||
``` javascript
|
||||
|
||||
Logging.config(folder, stdout); //stdout can be true or false
|
||||
|
||||
const CustomLogging = new LoggingBase({
|
||||
name: "custom",
|
||||
logfile: "./logs/test.log",
|
||||
errorfile: "/var/log/custom.err",
|
||||
console_out: false
|
||||
});
|
||||
```
|
||||
|
||||
The name property prefixes the console output with the name. Also if no logfile or errorfile is created the following standard values are used:
|
||||
|
||||
./logs/all.<name>.log
|
||||
./logs/error.<name>.log
|
||||
|
||||
To not use any logfiles just set the values to null.
|
||||
# License
|
||||
MIT
|
||||
|
||||
|
||||
Reference in New Issue
Block a user