-
Notifications
You must be signed in to change notification settings - Fork 82
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
Added timestamp option to logger. #1984
base: master
Are you sure you want to change the base?
Added timestamp option to logger. #1984
Conversation
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.
LGTM!
I will ask Kasper or Erik to also have a look.
--name/string?=null | ||
--level/int?=null | ||
--tags/Map?=null | ||
--timestamp/bool?=null: |
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.
I think this should be called timestamped
.
I think I would change every instance of timestamp
with timestamped
.
Adds selected attributes to a copy of this logger. | ||
|
||
If $name is provided, the $name is added to the copy. | ||
If $level is provied, the $level is added to the copy. |
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.
If $level is provied, the $level is added to the copy. | |
If $level is provided, the $level is added to the copy. |
buffer ::= buffer_ | ||
|
||
if timestamp: | ||
buffer.write "$(Time.monotonic-us / 1000)" |
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.
The digits should be padded. Space is probably enough, but 0 would work too.
Not sure what the correct digit-amount is.
/** | ||
Creates a copy where timestamps are enabled. | ||
*/ | ||
with-timestamp -> Logger: |
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.
I could be convinced that with-timestamps
is better than with-timestamped
.
No description provided.