Socket
Socket
Sign inDemoInstall

@promisepending/logger.js

Package Overview
Dependencies
8
Maintainers
2
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

1.1.1

Diff

lobometalurgico
published 1.1.0 •

Changelog

Source

v1.1.0: Saving Everything

  • [NEW] Added support for logging to a file

    • [NEW] Added the fileProperties parameter to the Logger constructor which includes the following properties:

      • enable: enable logging to a file (defaults to false) [If false all the other properties will be ignored]

      • logFolderPath: path to the folder where the log files will be stored (will be created if it doesn't exist, defaults to ./logs)

      • enableLatestLog?: if true, the latest log file will be stored in the logFolderPath with the name latest.log (defaults to true)

      • enableDebugLog?: if true, the debug log will be stored in the logFolderPath inside a folder named latestLogs with the name debug.log (defaults to true)

      • enableErrorLog?: if true, the error log will be stored in the logFolderPath inside a folder named latestLogs with the name error.log (defaults to false)

      • enableFatalLog?: if true, the fatal log will be stored in the logFolderPath inside a folder named fatal-crash with the name fatal-DATE.log (defaults to true)

      • generateHTMLLog?: if true, the log files will be generated in HTML format (their extension will change from .log to .html) (defaults to false)

      • compressLogFilesAfterNewExecution?: if true, the log files will be compressed to a zip file after a new execution of the program (defaults to true)

    • [NEW] Added support to log objects, arrays and etc. Like the default console.log function.

    • [BREAKING] Changed the export of AutoLogEnd now importing the package will return the Logger class and a object named AutoLogEnd with the activate and deactivate functions.

    • [NEW] AutoLogEnd activate function now accepts a Logger instance as 2º parameter. If not passed it will create a new instance of Logger with the default parameters. otherwise it will use the passed instance.

lobometalurgico
published 1.0.4 •

lobometalurgico
published 1.0.3 •

lobometalurgico
published 1.0.2 •

lobometalurgico
published 1.0.1 •

lobometalurgico
published 1.0.0 •

Changelog

Source

v1.0.0: Logging Everything

  • [NEW] Initial release of logger

    • Supports Warning, Error, Info, Debug, and Fatal logging levels

    • Supports colored output if specified

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc