3.1.0 (2021-10-14)
- add redirect to github pages for old site to new domain (bae1b15)
- add step to workflow to purge expired artifacts (f051daf)
- deprecate
addLevel()
method (86897b1) - deprecate custom log levels (abba03a)
- rebuild site using Next.js with new design and more documentation (4304c1d)
3.0.2 (2021-10-01)
3.0.1 (2021-09-27)
3.0.0 (2021-04-12)
- add
.npmignore
file to help reduce the size of the package (c21bd7f) - add
.npmignore
file to help reduce the size of the package (9ccdc69) - do not use husky when on a CI environment (a17ac76)
- reverse the check for LAMBDALOG_SILENT env variable (95828b1)
- reverse the check for LAMBDALOG_SILENT env variable (5ab6dc5)
- move message.tags to a getter and setter (201a6fe)
- add ability for tags to be functions (459380f)
- add ability for tags to be functions (87ea24d)
- add ability to change the key names of the message output (4a71909)
- add ability to change the key names of the message output (bc1169b)
- add new method
addLevel()
to LambdaLog (9fde2e3) - add new method
addLevel()
to LambdaLog (f7dbfd0) - add new options
levelKey
,messageKey
, andtagsKey
(bb5ba70) - add new options
levelKey
,messageKey
, andtagsKey
(4d10968) - add new website! (44a15dc)
- add new website! (9aa6e2e)
- add symbols for referencing private properties in LogMessage (f4b1c99)
- add symbols for referencing private properties in LogMessage (beb5e39)
- add symbols to reference certain private properties (b502366)
- add symbols to reference certain private properties on LogMessage class (952b62d)
- convert Errors in metadata to plain objects #31 (f55d474)
- convert Errors in metadata to plain objects #31 (576052a)
- remove default tags and add tag variable support #29 (a43b0ae)
- remove default tags and add tag variable support #29 (ae686ef)
- set node engine to >= 10.0.0 (0b5e564)
- set node engine to >= 10.0.0 (2d022ec)
- switch from travis to github actions (6ca053f)
- use jest for testing and coverage (216141d)
- internal: add function to stub errors with a toJSON method (b5e3dbe)
- switch from travis to github actions (f2d418e)
- use jest for testing and coverage (fafed5d)
- internal: add function to stub errors with a toJSON method (d0707bd)
- There are no longer any built-in tags added to the tags array for each log message.
message.tags
is no longer a property of the LogMessage class that can be directly changed.- Whenever an Error object is passed into the metadata for a log message, it will automatically be converted to a plain object as stringifying the an Error object will always yield
{}
. - Previously you could directly access the private properties of LogMessage. In order to add some integrity, they are no longer using standard property names starting with an underscore and are instead referenced using symbols instead. For advanced usage, these symbols are exported as a static property on the LogMessage class under
LogMessage.symbols
. - Previously you could directly access the private properties of LambdaLog. In order to add some integrity, they are no longer using standard property names starting with an underscore and are instead referenced using symbols instead. For advanced usage, these symbols are exported as a static property on the LambdaLog class under
LambdaLog.symbols
.
2.4.0 (2020-05-15)
- check for "falsey" values for LAMBDALOG_SILENT (187f755)
- allow globally overriding silent via env var LAMBDALOG_SILENT (aecbfba)
2.3.1 (2019-09-03)
2.3.0 (2019-06-21)
- add .DS_Store to gitignore (968bd50)
- add
log.result()
method (3b98ec3)
- switch to fast-safe-stringify to increase performance (3f5fa59)
2.2.0 (2019-03-20)
- logmessage: allow overriding LogMessage (8a867ac)
- BREAKING: Removed
stdoutStream
andstderrStream
options. - NEW: Added
logHandler
option which takes aconsole
-like object to send logs through. (#11)
- Fix console logging pointing to global
console
instead of custom console instance for streaming. (@sh1n1chi8acker - #10) - Update mocha to v5.2.0
- Added
package-lock.json
to .gitignore as it's not needed for this module.
The new major release for lambda-log which contains many new extensibility features and a handful of new usability features. There are a few breaking changes from version 1.4.0 to keep in mind when migrating. All breaking changes will be noted in the changelog below:
- Moved
LambdaLog
class out ofindex.js
intolib/LambdaLog.js
for organization purposes. - NEW: Utilize
console
module (native Node) instead of the globalconsole
object for logging. This allows more control of where logs are redirected to for custom advanced integrations. - NEW: Log messages are now an instance of the
LogMessage
class which allows custom methods and better control over log messages.
- NEW: Added ability to configure the logger via the constructor (#3).
- NEW: Added ability to configure the log levels and methods via the constructor.
- NEW: Added
stdoutStream
andstderrStream
configuration options to configure the desired output of log messages. By default it redirects toprocess.stdout
andprocess.stderr
. - NEW: Added
dynamicMeta
configuration option which will allow dynamic metadata to be added to each log on creation. - NEW: Added
replacer
configuration option forJSON.stringify
. - BREAKING: Static method
isError()
has been moved to theLogMessage
class and is no longer accessible in theLambdaLog
class.
- NEW: All log functions now accept an array of tags to append to a log.
- FIX: Metadata passed into a log function will now be wrapped in a plain object if the provided value is not an object.
- BREAKING: All log functions now return an instance of
LogMessage
instead of a plain log object which allows directly calling additional methods ofLogMessage
(chaining). See documentation for more information.
- BREAKING: The
log
event now provides an instance ofLogMessage
instead of a plain object.
- Updated tests.
- Updated documentation/readme.
- Added
json-stringify-safe
to prevent issues with circular references. (@jogold)
- New: Added
log.assert()
. - Updated README formatting.
- Added Travis for automated test running.
- New: Added
_logLevel
as property to logged messages to allow easier searching in Cloudwatch Logs. - Added missing tests.
- Fix issue with
console.debug
not existing in Lambda.
- Breaking Change:
log
event now returns object containinglevel
,log
andmeta
.
- New: Added
log.debug()
method for debug messages. - New: Added
config.debug
to enable and disable debug log messages (default isfalse
).
- Initial release