Skip to content

Commit 0a35165

Browse files
Minor fixes to logging order
1 parent 6033898 commit 0a35165

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

ws_uplink.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,12 @@ namespace uplink {
4646
: inet_{inet}, id_{inet.link_addr().to_string()},
4747
parser_({this, &WS_uplink::handle_transport})
4848
{
49+
OS::add_stdout({this, &WS_uplink::send_log});
50+
4951
// This is not totally safe...
5052
LIVEUPD_LOCATION = (void*) (OS::heap_max() - 0x2000000); // 32MB below heap_max
5153
MYINFO("Maximum heap at (%p), assigning liveupdate location 32MB below (%p)", (void*)OS::heap_max(), LIVEUPD_LOCATION);
5254

53-
OS::add_stdout({this, &WS_uplink::send_log});
54-
5555
read_config();
5656

5757
if(inet_.is_configured())
@@ -61,13 +61,13 @@ namespace uplink {
6161
// if not, register on config event
6262
else
6363
{
64-
MYINFO("Interface not yet configured, starts when ready.");
64+
MYINFO("Interface %s not yet configured, starts when ready.", inet_.ifname().c_str());
6565
inet_.on_config({this, &WS_uplink::start});
6666
}
6767
}
6868

6969
void WS_uplink::start(net::Inet<net::IP4>& inet) {
70-
MYINFO("Starting WS uplink on %s with ID: %s",
70+
MYINFO("Starting WS uplink on %s with ID %s",
7171
inet.ifname().c_str(), id_.c_str());
7272

7373
Expects(inet.ip_addr() != 0 && "Network interface not configured");
@@ -183,10 +183,10 @@ namespace uplink {
183183

184184
ws_->on_close = {this, &WS_uplink::handle_ws_close};
185185

186-
MYINFO("Websocket established");
187-
188186
flush_log();
189187

188+
MYINFO("Websocket established");
189+
190190
send_ident();
191191

192192
send_uplink();

0 commit comments

Comments
 (0)