1.2.2 • Published 7 months ago

logs-frontend v1.2.2

Weekly downloads
-
License
ISC
Repository
-
Last release
7 months ago

LogsFast

A simple library for logging messages and saving them to localStorage.

📖 Table of Contents

Available Methods

1. log(params: I.Log): void

Logs a message to the console with date/time and optionally saves it to localStorage.

Parameters:

  • params: Object containing log details.
    • type: Log type (information, error, warning, etc.).
    • message: Message to be logged.
    • save (optional): Boolean to determine if the log should be saved to localStorage or not.

2. saveLogLocalStorage(params: I.Log): void

Saves a log message directly to localStorage.

Parameters:

  • params: Object containing log details.
    • type: Log type.
    • message: Message to be logged.

3. downloadLog(format: I.FormatDownload): void

Allows downloading the logs saved in localStorage in different formats.

Parameters:

  • format: File format for download (text, json, pdf).

Usage

import { logsFast } from "logs-frontend";

// Log an informational message to the console
logsFast.log({
  type: "info",
  message: "This is an informational message.",
  save: true, // Saves the message to localStorage
});

// Download the logs in text format
logsFast.downloadLog("text");
1.2.2

7 months ago

1.2.1

7 months ago

1.2.0

1 year ago

1.1.9

1 year ago

1.1.8

1 year ago

1.1.7

1 year ago

1.1.6

1 year ago

1.1.5

1 year ago

1.1.4

1 year ago

1.1.3

1 year ago

1.1.2

1 year ago

1.1.1

1 year ago

1.1.0

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago