Skip to content

Commit

Permalink
fix log level casing
Browse files Browse the repository at this point in the history
  • Loading branch information
aqrln committed Dec 14, 2024
1 parent 9072a33 commit f7d2f1b
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 12 deletions.
2 changes: 1 addition & 1 deletion libs/telemetry/src/exporter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ mod tests {
ExportedEvent(
spanId: SpanId("1"),
target: "test_event",
level: Info,
level: info,
timestamp: HrTime(0, 0),
attributes: {},
),
Expand Down
22 changes: 11 additions & 11 deletions libs/telemetry/src/layer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -723,7 +723,7 @@ mod tests {
CollectedEvent(
span_id: SpanId(1),
target: "telemetry::layer::tests",
level: Info,
level: info,
attributes: {
"message": "test event",
},
Expand Down Expand Up @@ -767,7 +767,7 @@ mod tests {
CollectedEvent(
span_id: SpanId(1),
target: "telemetry::layer::tests",
level: Info,
level: info,
attributes: {
"bool_attr": true,
"float_attr": 3.5,
Expand Down Expand Up @@ -809,15 +809,15 @@ mod tests {
CollectedEvent(
span_id: SpanId(1),
target: "telemetry::layer::tests",
level: Info,
level: info,
attributes: {
"message": "parent event",
},
),
CollectedEvent(
span_id: SpanId(2),
target: "telemetry::layer::tests",
level: Info,
level: info,
attributes: {
"message": "child event",
},
Expand Down Expand Up @@ -856,47 +856,47 @@ mod tests {
CollectedEvent(
span_id: SpanId(1),
target: "telemetry::layer::tests",
level: Error,
level: error,
attributes: {
"message": "error event",
},
),
CollectedEvent(
span_id: SpanId(1),
target: "telemetry::layer::tests",
level: Warn,
level: warn,
attributes: {
"message": "warn event",
},
),
CollectedEvent(
span_id: SpanId(1),
target: "telemetry::layer::tests",
level: Info,
level: info,
attributes: {
"message": "info event",
},
),
CollectedEvent(
span_id: SpanId(1),
target: "telemetry::layer::tests",
level: Debug,
level: debug,
attributes: {
"message": "debug event",
},
),
CollectedEvent(
span_id: SpanId(1),
target: "telemetry::layer::tests",
level: Trace,
level: trace,
attributes: {
"message": "trace event",
},
),
CollectedEvent(
span_id: SpanId(1),
target: "telemetry::layer::tests",
level: Query,
level: query,
attributes: {
"message": "query event",
},
Expand Down Expand Up @@ -961,7 +961,7 @@ mod tests {
CollectedEvent(
span_id: SpanId(1),
target: "telemetry::layer::tests",
level: Info,
level: info,
attributes: {
"kept_attr": "kept",
"message": "test event",
Expand Down
1 change: 1 addition & 0 deletions libs/telemetry/src/models.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ use serde::Serialize;
/// aren't really levels in a traditional sense, since they don't have a
/// hierarchy and order relation, but rather categories.
#[derive(Serialize, Debug, Clone, Copy, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
#[bitflags]
#[repr(u8)]
pub enum LogLevel {
Expand Down

0 comments on commit f7d2f1b

Please sign in to comment.