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

feat: add timestamp to log entries #31

Merged
merged 10 commits into from
Oct 27, 2020
Merged

Conversation

LayZeeDK
Copy link
Member

@LayZeeDK LayZeeDK commented Oct 22, 2020

PR Checklist

Please check if your PR fulfills the following requirements:

  • The commit message follows our guidelines: CONTRIBUTING.md#commit
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

PR Type

What kind of change does this PR introduce?

[ ] Bugfix
[x] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Other... Please describe:

What is the current behavior?

  1. Timestamps are created at the time of writing the log to the drivers rather than when the log entry was created.
  2. No timestamp property on LumberjackLog.
  3. Timestamp is created non-deterministically.
  4. Log factory functions are exposed.

Issue Number: N/A

What is the new behavior?

    • A timestamp property on the log entry represents when it was created
    • A createdAt: number property is added to LumberjackLog.
    • A LumberjackTimeService is used to determine the timestamp and its formatter.
    • Log factory functions are removed.

Does this PR introduce a breaking change?

[x] Yes
[ ] No

Log creators are removed, LumberjackLog#createdAt is added.

Other information

@LayZeeDK LayZeeDK changed the title feat: add LumberjackTimeService feat: add timestamps Oct 23, 2020
@LayZeeDK LayZeeDK changed the title feat: add timestamps feat: add timestamp to log entries Oct 23, 2020
@LayZeeDK LayZeeDK marked this pull request as ready for review October 23, 2020 20:43
@LayZeeDK
Copy link
Member Author

LayZeeDK commented Oct 23, 2020

Let me know if we should use a different property name for LumberjackLog#timestamp. Maybe one of:

  1. epochTicks
  2. unitTimestamp
  3. unixTicks
  4. unixEpochTicks
  5. unixEpochMilliseconds
  6. epochMilliseconds
  7. createdAt
  8. createdAtTimestamp

@NachoVazquez
Copy link
Contributor

Let me know if we should use a different property name for LumberjackLog#timestamp. Maybe one of:

I would go for 7 or 8. We could annotate it to describe how to handle the value but the name should be more meaningful.

@LayZeeDK LayZeeDK force-pushed the LayZeeDK/feat/timestamps branch 2 times, most recently from 42cf608 to f840d4a Compare October 24, 2020 23:20
@LayZeeDK
Copy link
Member Author

Wait for updated CI #34.

@NachoVazquez NachoVazquez merged commit dca4c8e into main Oct 27, 2020
@NachoVazquez NachoVazquez deleted the LayZeeDK/feat/timestamps branch October 27, 2020 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants