-
-
Notifications
You must be signed in to change notification settings - Fork 16
v4.0.0 #78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
BREAKING CHANGE
BREAKING CHANGE: This is the beta version for the next major release of LambdaLog. Do not use in production yet! Please report any issues you may find!
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/kross/lambda-log/8hPGLWAHiyoZRWx7NMb6RJyFGEYG |
ESLint Summary View Full Report
Report generated by eslint-plus-action |
# [4.0.0-beta.1](v3.2.0...v4.0.0-beta.1) (2021-11-17) ### Features * 4.0.0-beta ([fe34fe6](fe34fe6)) ### BREAKING CHANGES * This is the beta version for the next major release of LambdaLog. Do not use in production yet! Please report any issues you may find!
…console` pattern
* @param {Tag[]} [tags] Additional tags to append to this log. | ||
* @returns {LogMessage} Returns instance of LogMessage. | ||
*/ | ||
trace<T extends Message = Message>(msg: T, meta?: Metadata, tags?: Tag[]): LogMessage { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar blocks of code found in 7 locations. Consider refactoring.
* @param {Tag[]} [tags] Additional tags to append to this log. | ||
* @returns {LogMessage} Returns instance of LogMessage. | ||
*/ | ||
debug<T extends Message = Message>(msg: T, meta?: Metadata, tags?: Tag[]): LogMessage { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar blocks of code found in 7 locations. Consider refactoring.
* @param {Tag[]} [tags] Additional tags to append to this log. | ||
* @returns {LogMessage} Returns instance of LogMessage. | ||
*/ | ||
info<T extends Message = Message>(msg: T, meta?: Metadata, tags?: Tag[]): LogMessage { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar blocks of code found in 7 locations. Consider refactoring.
* @param {Tag[]} [tags] Additional tags to append to this log. | ||
* @returns {LogMessage} Returns instance of LogMessage. | ||
*/ | ||
log<T extends Message = Message>(msg: T, meta?: Metadata, tags?: Tag[]): LogMessage { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar blocks of code found in 7 locations. Consider refactoring.
* @param {Tag[]} [tags] Additional tags to append to this log. | ||
* @returns {LogMessage} Returns instance of LogMessage. | ||
*/ | ||
warn<T extends Message = Message>(msg: T, meta?: Metadata, tags?: Tag[]): LogMessage { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar blocks of code found in 7 locations. Consider refactoring.
* @param {Tag[]} [tags] Additional tags to append to this log. | ||
* @returns {LogMessage} Returns instance of LogMessage. | ||
*/ | ||
error<T extends Message = Message>(msg: T, meta?: Metadata, tags?: Tag[]): LogMessage { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar blocks of code found in 7 locations. Consider refactoring.
Code Climate has analyzed commit 1e5076c and detected 7 issues on this pull request. Here's the issue category breakdown:
The test coverage on the diff in this pull request is 100.0% (98% is the threshold). This pull request will bring the total coverage in the repository to 100.0%. View more on Code Climate. |
# [4.0.0-beta.5](v4.0.0-beta.4...v4.0.0-beta.5) (2021-12-10) ### Bug Fixes * add generic support to LogMessage class for specifying the message type ([6e6775a](6e6775a)) * add generic to LogObject type to specify type of Message ([cd1c746](cd1c746)) * explicitly set type to `string[]` for compiled tags returned from LogMessage ([fd873e3](fd873e3)) * remove generic from Message type ([cc10311](cc10311)) * remove toJSON() method from LogMessage since it's been moved to a formatter ([36fbdaa](36fbdaa)) * rename the `log` method to `_log` ([7317bf5](7317bf5)) * still generate the log message just don't log it when verbosity is set ([6e13564](6e13564)) * ts generics and typings on shortcut methods ([7e48904](7e48904)) ### Features * add `log` shortcut method as an alias for `info` to match the `console` pattern ([a3c1f16](a3c1f16)) * separate built-in formatters into separate files ([f8ecac7](f8ecac7))
@KyleRoss do you still plan on working on this? |
Kudos, SonarCloud Quality Gate passed!
|
Hi! Is this release planned to happen still? |
Hi @KyleRoss, is this project still active? |
CAUTION!
This branch and release (
@beta
) is under heavy development. This exists for testing and anyone who is willing to help out with testing. DO NOT USE IN PRODUCTION!If you do decide to try out this brand new version of LambdaLog, please report any issues you face as I can only catch so much. Any help would be greatly appreciated, especially if you are more versed in TypeScript than I am!
What's new?
This is the next major release of LambdaLog (v4.0.0) which contains many major breaking changes, new features, and TypeScript support.
Breaking Changes
Symbol
has been removed along with any static properties on the classes to retrieve the symbols.debug
option has been removed.levelKey
has changed from_logLevel
to__level
.tagsKey
has changed from_tags
to__tags
.addLevel()
method from LambdaLog class.isError()
andstubError()
static methods from the LogMessage class and moved them into utility functions.New Features
level
option orLAMBDALOG_LEVEL
env variable.fatal
andtrace
log levels.onParse
option that allows for custom parsing of log messages.onCompile
option that allows for custom structuring of the object that is logged to the console.onFormat
option that allows for custom formatting of the logged message. This gives the ability to render log messages in any format, not just JSON. (Disable JSON logging for development #75)clean
formatter that logs a message in a readable format.minimal
formatter that logs a message in a readable format without tags and metadata.level
,dev
, andsilent
options via environment variables.Fixes
log.options.logHandler
did not work (Setting log.options.logHandler doesn't seems to work #45).Misc. Changes
What's left?
It has been a pretty large undertaking for me, but one that this package desperately needed. This was my first real dive into TypeScript, so I'm sure there are things than can be written better. If there is anyone with more advanced TypeScript knowledge, I'm in great need of someone who can review the code and suggest any changes or help refactor the code to get this production-ready. (I'll even add you as a maintainer!)
Release Date
As much as I am trying to rush this out the door to get these features in the hands of all you awesome developers/engineers, I'm also limited on time (eg. I'm currently writing this documentation at midnight knowing that I have to wake up at 5:30am). Not only that, but I want to ensure I ship this next version of LambdaLog with performance, features, and stability in mind. I hope this will be the last major version for awhile.
Enough with all of that cheesy sob-story, let's talk about when this will be released, well, what I'm aiming for at this point. I hope to finish up most of my to-do list in the next couple of weeks and try to solicit some outside help for testing/analysis. Once that is complete, I hope to get this released as the latest stable version towards the end of 2021 or at the beginning of 2022. That's not guarantee at this point, but it will definitely be feasible if anyone in the community can help out!