Hlogs is a npm package that helps on log creation and it's stored on root project. It's recommended to add "hlogs.log" on .gitignore to avoid commiting personal logs in versioning system.
Use npm to install hlogs.
npm i hlogs
Import & Initialize
import { Log } from "hlogs"
const log = new Log()
Add Logs
log.add("Log message"); // Saves to file and prints to console (default)
log.add("Log message", false); // Saves to file and doesn't print to console
Find Logs by id
const logEntry = log.find("LOG_ID"); // Returns log or "Log not found"
console.log(logEntry);
Log structure
[DD/MM/YYYY HH:mm:ss] - UNIQUE_ID - Log message
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.