Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
dynamo
Commits
9e6a84af
Unverified
Commit
9e6a84af
authored
Mar 02, 2026
by
Ryan McCormick
Committed by
GitHub
Mar 02, 2026
Browse files
chore(style): Log with {var} style in lib/runtime (#6757)
parent
72eabeae
Changes
24
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
12 deletions
+12
-12
lib/runtime/src/utils/graceful_shutdown.rs
lib/runtime/src/utils/graceful_shutdown.rs
+2
-2
lib/runtime/src/utils/typed_prefix_watcher.rs
lib/runtime/src/utils/typed_prefix_watcher.rs
+3
-3
lib/runtime/src/worker.rs
lib/runtime/src/worker.rs
+1
-1
lib/runtime/tests/common/mock.rs
lib/runtime/tests/common/mock.rs
+6
-6
No files found.
lib/runtime/src/utils/graceful_shutdown.rs
View file @
9e6a84af
...
@@ -63,7 +63,7 @@ impl GracefulShutdownTracker {
...
@@ -63,7 +63,7 @@ impl GracefulShutdownTracker {
let
notified
=
self
.shutdown_complete
.notified
();
let
notified
=
self
.shutdown_complete
.notified
();
let
count
=
self
.active_endpoints
.load
(
Ordering
::
SeqCst
);
let
count
=
self
.active_endpoints
.load
(
Ordering
::
SeqCst
);
tracing
::
trace!
(
"Checking completion status, active endpoints: {
}"
,
count
);
tracing
::
trace!
(
"Checking completion status, active endpoints: {count
}"
);
if
count
==
0
{
if
count
==
0
{
tracing
::
debug!
(
"All endpoints completed"
);
tracing
::
debug!
(
"All endpoints completed"
);
...
@@ -71,7 +71,7 @@ impl GracefulShutdownTracker {
...
@@ -71,7 +71,7 @@ impl GracefulShutdownTracker {
}
}
// Only wait if there are still active endpoints
// Only wait if there are still active endpoints
tracing
::
debug!
(
"Waiting for {} endpoints to complete"
,
count
);
tracing
::
debug!
(
"Waiting for {
count
} endpoints to complete"
);
notified
.await
;
notified
.await
;
tracing
::
trace!
(
"Received notification, rechecking..."
);
tracing
::
trace!
(
"Received notification, rechecking..."
);
}
}
...
...
lib/runtime/src/utils/typed_prefix_watcher.rs
View file @
9e6a84af
...
@@ -100,12 +100,12 @@ where
...
@@ -100,12 +100,12 @@ where
loop
{
loop
{
tokio
::
select!
{
tokio
::
select!
{
_
=
cancellation_token
.cancelled
()
=>
{
_
=
cancellation_token
.cancelled
()
=>
{
tracing
::
debug!
(
"TypedPrefixWatcher for prefix '{}' cancelled"
,
prefix_str
);
tracing
::
debug!
(
"TypedPrefixWatcher for prefix '{
prefix_str
}' cancelled"
);
break
;
break
;
}
}
event
=
events_rx
.recv
()
=>
{
event
=
events_rx
.recv
()
=>
{
let
Some
(
event
)
=
event
else
{
let
Some
(
event
)
=
event
else
{
tracing
::
debug!
(
"TypedPrefixWatcher watch stream closed for prefix '{
}'"
,
prefix_str
);
tracing
::
debug!
(
"TypedPrefixWatcher watch stream closed for prefix '{prefix_str
}'"
);
break
;
break
;
};
};
...
@@ -163,7 +163,7 @@ where
...
@@ -163,7 +163,7 @@ where
}
}
}
}
tracing
::
debug!
(
"TypedPrefixWatcher for prefix '{}' stopped"
,
prefix_str
);
tracing
::
debug!
(
"TypedPrefixWatcher for prefix '{
prefix_str
}' stopped"
);
});
});
Ok
(
TypedPrefixWatcher
{
rx
:
watch_rx
})
Ok
(
TypedPrefixWatcher
{
rx
:
watch_rx
})
...
...
lib/runtime/src/worker.rs
View file @
9e6a84af
...
@@ -155,7 +155,7 @@ impl Worker {
...
@@ -155,7 +155,7 @@ impl Worker {
tokio
::
select!
{
tokio
::
select!
{
_
=
cancel_token
.cancelled
()
=>
{
_
=
cancel_token
.cancelled
()
=>
{
tracing
::
debug!
(
"{
}"
,
SHUTDOWN_MESSAGE
);
tracing
::
debug!
(
"{SHUTDOWN_MESSAGE
}"
);
tracing
::
debug!
(
"{} {} seconds"
,
SHUTDOWN_TIMEOUT_MESSAGE
,
timeout
);
tracing
::
debug!
(
"{} {} seconds"
,
SHUTDOWN_TIMEOUT_MESSAGE
,
timeout
);
}
}
...
...
lib/runtime/tests/common/mock.rs
View file @
9e6a84af
...
@@ -314,7 +314,7 @@ where
...
@@ -314,7 +314,7 @@ where
// todo(metrics): increment metric counter for bytes received
// todo(metrics): increment metric counter for bytes received
// todo(metrics): increment metric counter for requests received
// todo(metrics): increment metric counter for requests received
let
id
=
req
.id
.clone
();
let
id
=
req
.id
.clone
();
tracing
::
debug!
(
"[ingress] received request [id: {}]"
,
id
);
tracing
::
debug!
(
"[ingress] received request [id: {
id
}]"
);
// deserialize the request
// deserialize the request
let
request
=
serde_json
::
from_slice
::
<
T
>
(
&
req
.request
)
let
request
=
serde_json
::
from_slice
::
<
T
>
(
&
req
.request
)
...
@@ -353,18 +353,18 @@ where
...
@@ -353,18 +353,18 @@ where
.await
.await
.expect
(
"failed to send handshake"
);
.expect
(
"failed to send handshake"
);
tracing
::
trace!
(
"[ingress] handshake sent [id: {}]"
,
id
);
tracing
::
trace!
(
"[ingress] handshake sent [id: {
id
}]"
);
if
let
Ok
(
response
)
=
response
{
if
let
Ok
(
response
)
=
response
{
// spawn a task to process the response stream:
// spawn a task to process the response stream:
// - serialize each response
// - serialize each response
// - forward the bytes to the data plane
// - forward the bytes to the data plane
tracing
::
debug!
(
"[ingress] processing response stream [id: {}]"
,
id
);
tracing
::
debug!
(
"[ingress] processing response stream [id: {
id
}]"
);
tokio
::
spawn
(
async
move
{
tokio
::
spawn
(
async
move
{
let
mut
response
=
response
;
let
mut
response
=
response
;
while
let
Some
(
resp
)
=
response
.next
()
.await
{
while
let
Some
(
resp
)
=
response
.next
()
.await
{
tracing
::
trace!
(
"[ingress] received response [id: {}]"
,
id
);
tracing
::
trace!
(
"[ingress] received response [id: {
id
}]"
);
let
resp_bytes
=
serde_json
::
to_vec
(
&
resp
)
let
resp_bytes
=
serde_json
::
to_vec
(
&
resp
)
.expect
(
"failed to serialize response"
);
.expect
(
"failed to serialize response"
);
...
@@ -380,10 +380,10 @@ where
...
@@ -380,10 +380,10 @@ where
.await
.await
.expect
(
"failed to send response"
);
.expect
(
"failed to send response"
);
tracing
::
trace!
(
"[ingress] sent response [id: {}]"
,
id
);
tracing
::
trace!
(
"[ingress] sent response [id: {
id
}]"
);
}
}
tracing
::
debug!
(
"response stream completed [id: {}]"
,
id
);
tracing
::
debug!
(
"response stream completed [id: {
id
}]"
);
});
});
}
}
}
}
...
...
Prev
1
2
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment