Skip to content

Commit 59e303c

Browse files
committed
Add missing tags in logs
1 parent f8e04f5 commit 59e303c

13 files changed

+78
-78
lines changed

AutoStart/AutoStart-FreeBSD.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ bool AutoStart::DisableAutoStart()
5353
}
5454
else
5555
{
56-
LOG_ERROR("Could not establish correct autostart file path.");
56+
LOG_ERROR("[AutoStart] Could not establish correct autostart file path.");
5757
}
5858

5959
return(success);
@@ -75,7 +75,7 @@ bool AutoStart::EnableAutoStart(AutoStartInfo autostart_info)
7575
\*---------------------------------------------*/
7676
if(!autostart_file_stream)
7777
{
78-
LOG_ERROR("Could not open %s for writing.", autostart_file.c_str());
78+
LOG_ERROR("[AutoStart] Could not open %s for writing.", autostart_file.c_str());
7979
success = false;
8080
}
8181
/*---------------------------------------------*\
@@ -89,13 +89,13 @@ bool AutoStart::EnableAutoStart(AutoStartInfo autostart_info)
8989

9090
if (!success)
9191
{
92-
LOG_ERROR("An error occurred writing the auto start file.");
92+
LOG_ERROR("[AutoStart] An error occurred writing the auto start file.");
9393
}
9494
}
9595
}
9696
else
9797
{
98-
LOG_ERROR("Could not establish correct autostart file path.");
98+
LOG_ERROR("[AutoStart] Could not establish correct autostart file path.");
9999
}
100100

101101
return(success);

AutoStart/AutoStart-Linux.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ bool AutoStart::DisableAutoStart()
5353
}
5454
else
5555
{
56-
LOG_ERROR("Could not establish correct autostart file path.");
56+
LOG_ERROR("[AutoStart] Could not establish correct autostart file path.");
5757
}
5858

5959
return(success);
@@ -76,7 +76,7 @@ bool AutoStart::EnableAutoStart(AutoStartInfo autostart_info)
7676
\*---------------------------------------------*/
7777
if(!autostart_file_stream)
7878
{
79-
LOG_ERROR("Could not open %s for writing.", autostart_file.c_str());
79+
LOG_ERROR("[AutoStart] Could not open %s for writing.", autostart_file.c_str());
8080
success = false;
8181
}
8282
/*---------------------------------------------*\
@@ -90,13 +90,13 @@ bool AutoStart::EnableAutoStart(AutoStartInfo autostart_info)
9090

9191
if (!success)
9292
{
93-
LOG_ERROR("An error occurred writing the auto start file.");
93+
LOG_ERROR("[AutoStart] An error occurred writing the auto start file.");
9494
}
9595
}
9696
}
9797
else
9898
{
99-
LOG_ERROR("Could not establish correct autostart file path.");
99+
LOG_ERROR("[AutoStart] Could not establish correct autostart file path.");
100100
}
101101

102102
return(success);

AutoStart/AutoStart-MacOS.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ bool AutoStart::DisableAutoStart()
5353
}
5454
else
5555
{
56-
LOG_ERROR("Could not establish correct autostart file path.");
56+
LOG_ERROR("[AutoStart] Could not establish correct autostart file path.");
5757
}
5858

5959
return(success);
@@ -76,7 +76,7 @@ bool AutoStart::EnableAutoStart(AutoStartInfo autostart_info)
7676
\*---------------------------------------------*/
7777
if(!autostart_file_stream)
7878
{
79-
LOG_ERROR("Could not open %s for writing.", autostart_file.c_str());
79+
LOG_ERROR("[AutoStart] Could not open %s for writing.", autostart_file.c_str());
8080
success = false;
8181
}
8282
/*---------------------------------------------*\
@@ -90,13 +90,13 @@ bool AutoStart::EnableAutoStart(AutoStartInfo autostart_info)
9090

9191
if (!success)
9292
{
93-
LOG_ERROR("An error occurred writing the auto start file.");
93+
LOG_ERROR("[AutoStart] An error occurred writing the auto start file.");
9494
}
9595
}
9696
}
9797
else
9898
{
99-
LOG_ERROR("Could not establish correct autostart file path.");
99+
LOG_ERROR("[AutoStart] Could not establish correct autostart file path.");
100100
}
101101

102102
return(success);

AutoStart/AutoStart-Windows.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,13 @@ bool AutoStart::DisableAutoStart()
4646

4747
if(!success)
4848
{
49-
LOG_ERROR("An error occurred removing the auto start file.");
49+
LOG_ERROR("[AutoStart] An error occurred removing the auto start file.");
5050
}
5151
}
5252
}
5353
else
5454
{
55-
LOG_ERROR("Could not establish correct autostart file path.");
55+
LOG_ERROR("[AutoStart] Could not establish correct autostart file path.");
5656
}
5757

5858
return(success);
@@ -124,7 +124,7 @@ bool AutoStart::EnableAutoStart(AutoStartInfo autostart_info)
124124
}
125125
else
126126
{
127-
LOG_ERROR("Could not establish correct autostart file path.");
127+
LOG_ERROR("[AutoStart] Could not establish correct autostart file path.");
128128
}
129129

130130
return success;

LogManager.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ void LogManager::setLoglevel(unsigned int level)
315315
level = LL_TRACE;
316316
}
317317

318-
LOG_DEBUG("Loglevel set to %d", level);
318+
LOG_DEBUG("[LogManager] Loglevel set to %d", level);
319319

320320
/*-------------------------------------------------*\
321321
| Set the new log level |
@@ -335,7 +335,7 @@ void LogManager::setVerbosity(unsigned int level)
335335
level = LL_TRACE;
336336
}
337337

338-
LOG_DEBUG("Verbosity set to %d", level);
338+
LOG_DEBUG("[LogManager] Verbosity set to %d", level);
339339

340340
/*-------------------------------------------------*\
341341
| Set the new verbosity |
@@ -345,13 +345,13 @@ void LogManager::setVerbosity(unsigned int level)
345345

346346
void LogManager::setPrintSource(bool v)
347347
{
348-
LOG_DEBUG("Source code location printouts were %s", v ? "enabled" : "disabled");
348+
LOG_DEBUG("[LogManager] Source code location printouts were %s", v ? "enabled" : "disabled");
349349
print_source = v;
350350
}
351351

352352
void LogManager::RegisterDialogShowCallback(LogDialogShowCallback callback, void* receiver)
353353
{
354-
LOG_DEBUG("dialog show callback registered");
354+
LOG_DEBUG("[LogManager] dialog show callback registered");
355355
dialog_show_callbacks.push_back(callback);
356356
dialog_show_callback_args.push_back(receiver);
357357
}

NetworkServer.cpp

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ NetworkClientInfo::~NetworkClientInfo()
4949
{
5050
if(client_sock != INVALID_SOCKET)
5151
{
52-
LOG_INFO("NetworkServer: Closing server connection: %s", client_ip.c_str());
52+
LOG_INFO("[NetworkServer] Closing server connection: %s", client_ip.c_str());
5353
delete client_listen_thread;
5454
shutdown(client_sock, SD_RECEIVE);
5555
closesocket(client_sock);
@@ -269,7 +269,7 @@ void NetworkServer::StartServer()
269269

270270
if(err)
271271
{
272-
LOG_ERROR("NetworkServer: Unable to get address.");
272+
LOG_ERROR("[NetworkServer] Unable to get address.");
273273
WSACleanup();
274274
return;
275275
}
@@ -283,7 +283,7 @@ void NetworkServer::StartServer()
283283

284284
if(server_sock[socket_count] == INVALID_SOCKET)
285285
{
286-
LOG_ERROR("NetworkServer: Network socket could not be created.");
286+
LOG_ERROR("[NetworkServer] Network socket could not be created.");
287287
WSACleanup();
288288
return;
289289
}
@@ -295,31 +295,31 @@ void NetworkServer::StartServer()
295295
{
296296
if(errno == EADDRINUSE)
297297
{
298-
LOG_ERROR("NetworkServer: Could not bind network socket. Is port %hu already being used?", GetPort());
298+
LOG_ERROR("[NetworkServer] Could not bind network socket. Is port %hu already being used?", GetPort());
299299
}
300300
else if(errno == EACCES)
301301
{
302-
LOG_ERROR("NetworkServer: Could not bind network socket. Access to socket was denied.");
302+
LOG_ERROR("[NetworkServer] Could not bind network socket. Access to socket was denied.");
303303
}
304304
else if(errno == EBADF)
305305
{
306-
LOG_ERROR("NetworkServer: Could not bind network socket. sockfd is not a valid file descriptor.");
306+
LOG_ERROR("[NetworkServer] Could not bind network socket. sockfd is not a valid file descriptor.");
307307
}
308308
else if(errno == EINVAL)
309309
{
310-
LOG_ERROR("NetworkServer: Could not bind network socket. The socket is already bound to an address, or addrlen is wrong, or addr is not a valid address for this socket's domain.");
310+
LOG_ERROR("[NetworkServer] Could not bind network socket. The socket is already bound to an address, or addrlen is wrong, or addr is not a valid address for this socket's domain.");
311311
}
312312
else if(errno == ENOTSOCK)
313313
{
314-
LOG_ERROR("NetworkServer: Could not bind network socket. The file descriptor sockfd does not refer to a socket.");
314+
LOG_ERROR("[NetworkServer] Could not bind network socket. The file descriptor sockfd does not refer to a socket.");
315315
}
316316
else
317317
{
318318
/*---------------------------------------------------------*\
319319
| errno could be a Linux specific error, see: |
320320
| https://man7.org/linux/man-pages/man2/bind.2.html |
321321
\*---------------------------------------------------------*/
322-
LOG_ERROR("NetworkManager: Could not bind network socket. Error code: %d.", errno);
322+
LOG_ERROR("[NetworkServer] Could not bind network socket. Error code: %d.", errno);
323323
}
324324

325325
WSACleanup();
@@ -391,7 +391,7 @@ void NetworkServer::ConnectionThreadFunction(int socket_idx)
391391
/*---------------------------------------------------------*\
392392
| This thread handles client connections |
393393
\*---------------------------------------------------------*/
394-
LOG_INFO("NetworkServer: Network connection thread started on port %hu", GetPort());
394+
LOG_INFO("[NetworkServer] Network connection thread started on port %hu", GetPort());
395395

396396
while(server_online == true)
397397
{
@@ -407,7 +407,7 @@ void NetworkServer::ConnectionThreadFunction(int socket_idx)
407407
\*---------------------------------------------------------*/
408408
if(listen(server_sock[socket_idx], 10) < 0)
409409
{
410-
LOG_INFO("NetworkServer: Connection thread closed");
410+
LOG_INFO("[NetworkServer] Connection thread closed");
411411
server_online = false;
412412

413413
return;
@@ -423,7 +423,7 @@ void NetworkServer::ConnectionThreadFunction(int socket_idx)
423423

424424
if(client_info->client_sock < 0)
425425
{
426-
LOG_INFO("NetworkServer: Connection thread closed");
426+
LOG_INFO("[NetworkServer] Connection thread closed");
427427
server_online = false;
428428

429429
server_listening = false;
@@ -482,7 +482,7 @@ void NetworkServer::ConnectionThreadFunction(int socket_idx)
482482
ClientInfoChanged();
483483
}
484484

485-
LOG_INFO("NetworkServer: Connection thread closed");
485+
LOG_INFO("[NetworkServer] Connection thread closed");
486486
server_online = false;
487487
server_listening = false;
488488
ServerListeningChanged();
@@ -552,7 +552,7 @@ void NetworkServer::ListenThreadFunction(NetworkClientInfo * client_info)
552552
{
553553
SOCKET client_sock = client_info->client_sock;
554554

555-
LOG_INFO("NetworkServer: Network server started");
555+
LOG_INFO("[NetworkServer] Network server started");
556556

557557
/*---------------------------------------------------------*\
558558
| This thread handles messages received from clients |
@@ -572,7 +572,7 @@ void NetworkServer::ListenThreadFunction(NetworkClientInfo * client_info)
572572

573573
if(bytes_read <= 0)
574574
{
575-
LOG_ERROR("NetworkServer: recv_select failed receiving magic, closing listener");
575+
LOG_ERROR("[NetworkServer] recv_select failed receiving magic, closing listener");
576576
goto listen_done;
577577
}
578578

@@ -581,7 +581,7 @@ void NetworkServer::ListenThreadFunction(NetworkClientInfo * client_info)
581581
\*---------------------------------------------------------*/
582582
if(header.pkt_magic[i] != openrgb_sdk_magic[i])
583583
{
584-
LOG_ERROR("NetworkServer: Invalid magic received");
584+
LOG_ERROR("[NetworkServer] Invalid magic received");
585585
continue;
586586
}
587587
}
@@ -601,7 +601,7 @@ void NetworkServer::ListenThreadFunction(NetworkClientInfo * client_info)
601601

602602
if(tmp_bytes_read <= 0)
603603
{
604-
LOG_ERROR("NetworkServer: recv_select failed receiving header, closing listener");
604+
LOG_ERROR("[NetworkServer] recv_select failed receiving header, closing listener");
605605
goto listen_done;
606606
}
607607

@@ -623,7 +623,7 @@ void NetworkServer::ListenThreadFunction(NetworkClientInfo * client_info)
623623

624624
if(tmp_bytes_read <= 0)
625625
{
626-
LOG_ERROR("NetworkServer: recv_select failed receiving data, closing listener");
626+
LOG_ERROR("[NetworkServer] recv_select failed receiving data, closing listener");
627627
goto listen_done;
628628
}
629629
bytes_read += tmp_bytes_read;
@@ -715,7 +715,7 @@ void NetworkServer::ListenThreadFunction(NetworkClientInfo * client_info)
715715
}
716716
else
717717
{
718-
LOG_ERROR("NetworkServer: UpdateLEDs packet has invalid size. Packet size: %d, Data size: %d", header.pkt_size, *((unsigned int*)data));
718+
LOG_ERROR("[NetworkServer] UpdateLEDs packet has invalid size. Packet size: %d, Data size: %d", header.pkt_size, *((unsigned int*)data));
719719
goto listen_done;
720720
}
721721
break;
@@ -752,7 +752,7 @@ void NetworkServer::ListenThreadFunction(NetworkClientInfo * client_info)
752752
}
753753
else
754754
{
755-
LOG_ERROR("NetworkServer: UpdateZoneLEDs packet has invalid size. Packet size: %d, Data size: %d", header.pkt_size, *((unsigned int*)data));
755+
LOG_ERROR("[NetworkServer] UpdateZoneLEDs packet has invalid size. Packet size: %d, Data size: %d", header.pkt_size, *((unsigned int*)data));
756756
goto listen_done;
757757
}
758758
break;
@@ -781,7 +781,7 @@ void NetworkServer::ListenThreadFunction(NetworkClientInfo * client_info)
781781
}
782782
else
783783
{
784-
LOG_ERROR("NetworkServer: UpdateSingleLED packet has invalid size. Packet size: %d, Data size: %d", header.pkt_size, (sizeof(int) + sizeof(RGBColor)));
784+
LOG_ERROR("[NetworkServer] UpdateSingleLED packet has invalid size. Packet size: %d, Data size: %d", header.pkt_size, (sizeof(int) + sizeof(RGBColor)));
785785
goto listen_done;
786786
}
787787
break;
@@ -821,7 +821,7 @@ void NetworkServer::ListenThreadFunction(NetworkClientInfo * client_info)
821821
}
822822
else
823823
{
824-
LOG_ERROR("NetworkServer: UpdateMode packet has invalid size. Packet size: %d, Data size: %d", header.pkt_size, *((unsigned int*)data));
824+
LOG_ERROR("[NetworkServer] UpdateMode packet has invalid size. Packet size: %d, Data size: %d", header.pkt_size, *((unsigned int*)data));
825825
goto listen_done;
826826
}
827827
break;

PluginManager.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ void PluginManager::AddPlugin(const filesystem::path& path, bool is_system)
209209
ResourceManager::get()->GetSettingsManager()->SaveSettings();
210210
}
211211

212-
LOG_VERBOSE("Loaded plugin %s", info.Name.c_str());
212+
LOG_VERBOSE("[PluginManager] Loaded plugin %s", info.Name.c_str());
213213

214214
/*-----------------------------------------------------*\
215215
| Add the plugin to the PluginManager active plugins |

ProfileManager.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ bool ProfileManager::LoadProfileWithOptions
403403
{
404404
bool temp_ret_val = LoadDeviceFromListWithOptions(temp_controllers, temp_controller_used, controllers[controller_index], load_size, load_settings);
405405
std::string current_name = controllers[controller_index]->name + " @ " + controllers[controller_index]->location;
406-
LOG_INFO("Profile loading: %s for %s", ( temp_ret_val ? "Succeeded" : "FAILED!" ), current_name.c_str());
406+
LOG_INFO("[ProfileManager] Profile loading: %s for %s", ( temp_ret_val ? "Succeeded" : "FAILED!" ), current_name.c_str());
407407
ret_val |= temp_ret_val;
408408
}
409409

@@ -443,7 +443,7 @@ void ProfileManager::UpdateProfileList()
443443

444444
if(filename.find(".orp") != std::string::npos)
445445
{
446-
LOG_INFO("Found file: %s attempting to validate header", filename.c_str());
446+
LOG_INFO("[ProfileManager] Found file: %s attempting to validate header", filename.c_str());
447447

448448
/*---------------------------------------------------------*\
449449
| Open input file in binary mode |
@@ -471,16 +471,16 @@ void ProfileManager::UpdateProfileList()
471471
filename.erase(filename.length() - 4);
472472
profile_list.push_back(filename);
473473

474-
LOG_INFO("Valid v%i profile found for %s", profile_version, filename.c_str());
474+
LOG_INFO("[ProfileManager] Valid v%i profile found for %s", profile_version, filename.c_str());
475475
}
476476
else
477477
{
478-
LOG_WARNING("Profile %s isn't valid for current version (v%i, expected v%i at most)", filename.c_str(), profile_version, OPENRGB_PROFILE_VERSION);
478+
LOG_WARNING("[ProfileManager] Profile %s isn't valid for current version (v%i, expected v%i at most)", filename.c_str(), profile_version, OPENRGB_PROFILE_VERSION);
479479
}
480480
}
481481
else
482482
{
483-
LOG_WARNING("Profile %s isn't valid: header is missing", filename.c_str());
483+
LOG_WARNING("[ProfileManager] Profile %s isn't valid: header is missing", filename.c_str());
484484
}
485485

486486
profile_file.close();

0 commit comments

Comments
 (0)