0.3.2 • Published 7 years ago

historia-log v0.3.2

Weekly downloads
-
License
MIT
Repository
-
Last release
7 years ago

Historia-Log alt test alt text

Historia-Log is a Node.JS module that handles various logging tasks

Basics


error.Print(msg , code=0, err, tb=false)

Required:
msg - A string that will be printed as a part of an error

Optional:
code - A string or integer to be displayed to the right of the error header.
err - An error object generated by a catch block tb - A boolean value denoting whether a traceback will be printed

error.Log(Book, msg , code=0, err, tb=false, callback)

Required:
Book - The Book object that holds the logging information. msg - A string that will be printed as a part of an error code - A string or integer to be displayed to the right of the error header.
err - An error object generated by a catch block tb - A boolean value denoting whether a traceback will be printed callback - The callback function receives msg, code, err, and tb.

info.Print(msg)

info.Warn(msg)

info.Success(msg)

Required:
msg - A string that will be printed.

info.Detail(prefixes, msg)

Required:
prefixes - An array of strings that will be color coded and displayed before the message
msg - A string that will be displayed.

info.Log(Book, prefixes, msg, callback)

Required:
Book - The Book object that holds the logging information. prefixes - An array of strings that will be color coded and displayed before the message msg - A string that will be printed as a part of an error callback - The callback function receives prefixes and msg.

Change Log


VersionDateNotes
0.1.008-31-2018Stylized console logging
0.2.008-31-2018More styled printing presets
Stylized errors
Errors have optional tracebacks
0.2.108-31-2018Bug fix
0.2.209-01-2018Bug fix
0.2.309-04-2018Removed Unnecessary/Unused feature
0.3.009-04-2018Added File logging
Merged /src/log.js in to /src/info.js
Modified API
0.3.2

7 years ago

0.3.1

7 years ago

0.3.0

7 years ago

0.2.3

7 years ago

0.2.2

7 years ago

0.2.1

7 years ago

0.2.0

7 years ago

0.1.0

7 years ago