README
Table of Contents
- BunyanDo
- getLogger
- log
- resolveLevel
- setSerializer
- setFile
- streamIs
- validateStreams
- formatStream
- consoleLog
- consoleLog
- fileStream
- rotatingFileStream
- init
BunyanDo
Extends LoggerITF
Extend Bunyan logger
getLogger
Return the current Bunyan logger
Returns any Bunyan Logger
log
Logs message
Parameters
message
String Message to be loggedlevel
(String | Number | undefined) Level that the message will be logged
resolveLevel
Validates input and returns formatted level
Parameters
level
(String | Number | undefined) Level that the message will be loggedThrows TypeError if the input does not match any valid level
Returns String Formatted level
setSerializer
Sets logger serializer to the defaults of the logger or overridden by input
Parameters
Returns any serializer functions
setFile
Review, format path/filename, and return valid path that is writable
Parameters
filename
String Path and filename for logThrows TypeError Path is invalid
Throws TypeError Filename is invalid
Throws TypeError Path is not writable
Returns any Usable path
streamIs
Reviews and IDs a stream
Parameters
stream
JSON Valid stream format
Returns String Stream type
validateStreams
Validates a single or Array of streams and returns an array of valid streams. Replaces undefined with consoleLog stream.
Parameters
Returns Array Valid streams
formatStream
Evaluates the input stream and ensures that it meets the format needed
Parameters
stream
JSON Object that provides defaults subject to this type of stream
Returns JSON
consoleLog
Creates stream object that supports this type of stream
Parameters
Returns JSON
consoleLog
Creates stream object that supports this type of stream
Parameters
Returns JSON
fileStream
Creates stream object that supports this type of stream
Parameters
Returns JSON
rotatingFileStream
Creates stream object that supports this type of stream
Parameters
Returns JSON
init
(Static) Intantiates and returns product without the need to "new"
Returns Class Instantiated class