hlogs
TypeScript icon, indicating that this package has built-in type declarations

1.0.5 • Public • Published

hlogs

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.

📦 Installation

Use npm to install hlogs.

npm i hlogs

🚀 Usage

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

🧑‍💻 Contributing

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.

⚖️ License

MIT

Readme

Keywords

Package Sidebar

Install

npm i hlogs

Weekly Downloads

19

Version

1.0.5

License

ISC

Unpacked Size

24.4 kB

Total Files

9

Last publish

Collaborators

  • rafaelhadzic