@mangar2/errorlog

1.0.3 • Public • Published

Abstract

Errorlog is a small helper to log error messages ( usually used in catch blocks )

Example

errorLog('hello world')
errorLog(new Error('hello world'), false)

Contents

Meta

File errorlog.js
Abstract Errorlog is a small helper to log error messages ( usually used in catch blocks )
Author Volker Böhm
Copyright Copyright ( c ) 2020 Volker Böhm
License This software is licensed under the GNU LESSER GENERAL PUBLIC LICENSE Version 3 . It is furnished "as is" , without any support , and with no warranty , express or implied , as to its usefulness for any purpose .

Global functions

errorLog

readonly errorLog (error, debug)

logs an error

  • If error is a string , it just logs the string .
  • If error is an Error object it logs the message and the stack trace ( if the debug flag is true ) .

errorLog Parameters

Name Type Attribute Default Description
error Error, string error object or error string
debug boolean optional true true to print the full stack trace

Readme

Keywords

Package Sidebar

Install

npm i @mangar2/errorlog

Weekly Downloads

1

Version

1.0.3

License

LGPL-3.0-or-later

Unpacked Size

4.3 kB

Total Files

5

Last publish

Collaborators

  • mangar2