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

core: add support for recording 128-bit integers #2166

Merged
merged 2 commits into from
Jun 17, 2022

Conversation

davidbarsky
Copy link
Member

Motivation

I've received a request at work to record 128-bit integers and realized that we should probably support recording them.

Solution

Added two methods to the Visit trait, record_i128 and record_u128. However, I didn't add the size conversions present for 64-bit integers, as 128-bit integers are, at this time, more specialized.

Copy link
Member

@hawkw hawkw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

overall, this lgtm. i think before we merge this, it would be nice to update this line in the docs to also mention u128/i128?

//! (`i64`, `u64`, `f64`, `bool`, and `&str`) or using a `fmt::Display` or

tracing-core/src/field.rs Show resolved Hide resolved
@davidbarsky davidbarsky requested a review from hawkw June 17, 2022 20:50
@hawkw hawkw merged commit 201d21a into master Jun 17, 2022
@hawkw hawkw deleted the david/add-support-for-128-bit-numbers branch June 17, 2022 22:21
hawkw pushed a commit that referenced this pull request Jun 22, 2022
## Motivation

I've received a request at work to record 128-bit integers and realized
that we should probably support recording them.

## Solution

Added two methods to the `Visit` trait, `record_i128` and `record_u128`.
However, I didn't add the size conversions present for 64-bit integers,
as 128-bit integers are, at this time, more specialized.
hawkw pushed a commit that referenced this pull request Jun 22, 2022
## Motivation

I've received a request at work to record 128-bit integers and realized
that we should probably support recording them.

## Solution

Added two methods to the `Visit` trait, `record_i128` and `record_u128`.
However, I didn't add the size conversions present for 64-bit integers,
as 128-bit integers are, at this time, more specialized.
hawkw pushed a commit that referenced this pull request Jun 22, 2022
## Motivation

I've received a request at work to record 128-bit integers and realized
that we should probably support recording them.

## Solution

Added two methods to the `Visit` trait, `record_i128` and `record_u128`.
However, I didn't add the size conversions present for 64-bit integers,
as 128-bit integers are, at this time, more specialized.
hawkw pushed a commit that referenced this pull request Jun 22, 2022
## Motivation

I've received a request at work to record 128-bit integers and realized
that we should probably support recording them.

## Solution

Added two methods to the `Visit` trait, `record_i128` and `record_u128`.
However, I didn't add the size conversions present for 64-bit integers,
as 128-bit integers are, at this time, more specialized.
hawkw added a commit that referenced this pull request Jun 23, 2022
# 0.1.28 (June 23, 2022)

This release of `tracing-core` adds new `Value` implementations,
including one for `String`, to allow recording `&String` as a value
without having to call `as_str()` or similar, and for 128-bit integers
(`i128` and `u128`). In addition, it adds new methods and trait
implementations for `Subscriber`s.

### Added

- `Value` implementation for `String` ([#2164])
- `Value` implementation for `u128` and `i28` ([#2166])
- `downcast_ref` and `is` methods for `dyn Subscriber + Sync`,
  `dyn Subscriber + Send`, and `dyn Subscriber + Send + Sync` ([#2160])
- `Subscriber::event_enabled` method to enable filtering based on
  `Event` field
  values ([#2008])
- `Subscriber` implementation for `Box<S: Subscriber + ?Sized>` and
  `Arc<S: Subscriber + ?Sized>` ([#2161])

Thanks to @jswrenn and @CAD97 for contributing to this release!

[#2164]: #2164
[#2166]: #2166
[#2160]: #2160
[#2008]: #2008
[#2161]: #2161
hawkw added a commit that referenced this pull request Jun 24, 2022
# 0.1.28 (June 23, 2022)

This release of `tracing-core` adds new `Value` implementations,
including one for `String`, to allow recording `&String` as a value
without having to call `as_str()` or similar, and for 128-bit integers
(`i128` and `u128`). In addition, it adds new methods and trait
implementations for `Subscriber`s.

### Added

- `Value` implementation for `String` ([#2164])
- `Value` implementation for `u128` and `i28` ([#2166])
- `downcast_ref` and `is` methods for `dyn Subscriber + Sync`,
  `dyn Subscriber + Send`, and `dyn Subscriber + Send + Sync` ([#2160])
- `Subscriber::event_enabled` method to enable filtering based on
  `Event` field
  values ([#2008])
- `Subscriber` implementation for `Box<S: Subscriber + ?Sized>` and
  `Arc<S: Subscriber + ?Sized>` ([#2161])

Thanks to @jswrenn and @CAD97 for contributing to this release!

[#2164]: #2164
[#2166]: #2166
[#2160]: #2160
[#2008]: #2008
[#2161]: #2161
kaffarell pushed a commit to kaffarell/tracing that referenced this pull request May 22, 2024
# 0.1.28 (June 23, 2022)

This release of `tracing-core` adds new `Value` implementations,
including one for `String`, to allow recording `&String` as a value
without having to call `as_str()` or similar, and for 128-bit integers
(`i128` and `u128`). In addition, it adds new methods and trait
implementations for `Subscriber`s.

### Added

- `Value` implementation for `String` ([tokio-rs#2164])
- `Value` implementation for `u128` and `i28` ([tokio-rs#2166])
- `downcast_ref` and `is` methods for `dyn Subscriber + Sync`,
  `dyn Subscriber + Send`, and `dyn Subscriber + Send + Sync` ([tokio-rs#2160])
- `Subscriber::event_enabled` method to enable filtering based on
  `Event` field
  values ([tokio-rs#2008])
- `Subscriber` implementation for `Box<S: Subscriber + ?Sized>` and
  `Arc<S: Subscriber + ?Sized>` ([tokio-rs#2161])

Thanks to @jswrenn and @CAD97 for contributing to this release!

[tokio-rs#2164]: tokio-rs#2164
[tokio-rs#2166]: tokio-rs#2166
[tokio-rs#2160]: tokio-rs#2160
[tokio-rs#2008]: tokio-rs#2008
[tokio-rs#2161]: tokio-rs#2161
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.

2 participants