Skip to content

Commit ea75010

Browse files
chore: add tracing on connect (#107)
1 parent 4e8f00e commit ea75010

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

amp-embedded-infra-lib

amp-hal-st

Submodule amp-hal-st updated 65 files

postmaster/flex/FlexHttpClient.cpp

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,22 @@ namespace application
99
, tracer(tracer)
1010
{
1111
if (!firmware.empty())
12+
{
13+
tracer.Trace() << "Connecting over HTTP to " << services::HostFromUrl(url) << " port " << port;
1214
Connect();
15+
}
1316
else
17+
{
18+
tracer.Trace() << "Connecting web socket to " << services::HostFromUrl(url) << " port " << port;
1419
connector.Connect(webSocketInitiation);
20+
}
1521
}
1622

1723
void FlexHttpClient::Attached()
1824
{
1925
HttpClientBasic::Attached();
2026

21-
tracer.Trace() << "Attached";
27+
tracer.Trace() << "Uploading firmware";
2228
infra::BoundedString path = Path();
2329
path += "/firmware/target";
2430

@@ -76,6 +82,9 @@ namespace application
7682
Subject().Detach();
7783

7884
if (inBodyComplete)
85+
{
86+
tracer.Trace() << "Upgrading to web socket";
7987
httpClient->Attach(infra::UnOwnedSharedPtr(webSocketInitiation));
88+
}
8089
}
8190
}

0 commit comments

Comments
 (0)