Skip to content
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

fix: Add timestamp to TransformableInfo interface #251

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jpramos123
Copy link

Simples solution to #250. Simply add the timestamp to the interface

Simples solution to winstonjs#250. Simply add the timestamp to the interface
@petarpetrov88
Copy link

Check out my PR I think it is a better solution because yours fix it only for the timestamp issue. Also my fix works for newer version of TS.

@wbt
Copy link
Contributor

wbt commented Feb 20, 2023

Is this property guaranteed to always exist, or would adding this as a required property (i.e. without ? before :) cause some code that now works (perhaps without timestamp) to stop working?

@jpramos123
Copy link
Author

Is this property guaranteed to always exist, or would adding this as a required property (i.e. with out ? before :) cause some code that now works (perhaps without timestamp) to stop working?

By making the same change, and not using timestamp, it looks like the code won't break.

Using winston log format:

const logFormat = printf(({ level, message }) => {
    return `${level}: ${message}`;
});

@wbt
Copy link
Contributor

wbt commented Feb 23, 2023

I wasn't referring specifically to your code, but asking generally about any code.
Can you imagine any code that works now that would not work with this patch applied to logform?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants