Skip to content

Commit 45eccb3

Browse files
committed
[#2820] revert some log msgs
1 parent dcd2f70 commit 45eccb3

8 files changed

+26
-45
lines changed

src/bin/dhcp4/dhcp4_messages.cc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -195,10 +195,10 @@ namespace {
195195
const char* values[] = {
196196
"DHCP4_ACTIVATE_INTERFACE", "activating interface %1",
197197
"DHCP4_ALREADY_RUNNING", "%1 already running? %2",
198-
"DHCP4_BUFFER_RECEIVED", "%1: received buffer from %2:%3 to %4:%5 over interface %6",
199-
"DHCP4_BUFFER_RECEIVE_FAIL", "%1: error on attempt to receive packet: %2",
200-
"DHCP4_BUFFER_UNPACK", "%1: parsing buffer received from %2 to %3 over interface %4",
201-
"DHCP4_BUFFER_WAIT_SIGNAL", "%1: signal received while waiting for next packet",
198+
"DHCP4_BUFFER_RECEIVED", "received buffer from %1:%2 to %3:%4 over interface %5",
199+
"DHCP4_BUFFER_RECEIVE_FAIL", "error on attempt to receive packet: %1",
200+
"DHCP4_BUFFER_UNPACK", "parsing buffer received from %1 to %2 over interface %3",
201+
"DHCP4_BUFFER_WAIT_SIGNAL", "signal received while waiting for next packet",
202202
"DHCP4_CB_ON_DEMAND_FETCH_UPDATES_FAIL", "error on demand attempt to fetch configuration updates from the configuration backend(s): %1",
203203
"DHCP4_CB_PERIODIC_FETCH_UPDATES_FAIL", "error on periodic attempt to fetch configuration updates from the configuration backend(s): %1",
204204
"DHCP4_CB_PERIODIC_FETCH_UPDATES_RETRIES_EXHAUSTED", "maximum number of configuration fetch attempts: 10, has been exhausted without success",
@@ -246,10 +246,10 @@ const char* values[] = {
246246
"DHCP4_DHCP4O6_BAD_PACKET", "%1: received malformed DHCPv4o6 packet: %2",
247247
"DHCP4_DHCP4O6_HOOK_SUBNET4_SELECT_DROP", "%1: packet was dropped, because a callout set the next step to 'drop'",
248248
"DHCP4_DHCP4O6_HOOK_SUBNET4_SELECT_SKIP", "%1: no subnet was selected, because a callout set the next skip flag",
249-
"DHCP4_DHCP4O6_PACKET_RECEIVED", "%1: received DHCPv4o6 packet from DHCPv4 server (type %2) for %3 on interface %4",
249+
"DHCP4_DHCP4O6_PACKET_RECEIVED", "received DHCPv4o6 packet from DHCPv4 server (type %1) for %2 on interface %3",
250250
"DHCP4_DHCP4O6_PACKET_SEND", "%1: trying to send packet %2 (type %3) to %4 port %5 on interface %6 encapsulating %7: %8 (type %9)",
251251
"DHCP4_DHCP4O6_PACKET_SEND_FAIL", "%1: failed to send DHCPv4o6 packet: %2",
252-
"DHCP4_DHCP4O6_RECEIVE_FAIL", "%1: failed to receive DHCPv4o6: %2",
252+
"DHCP4_DHCP4O6_RECEIVE_FAIL", "failed to receive DHCPv4o6: %1",
253253
"DHCP4_DHCP4O6_RECEIVING", "receiving DHCPv4o6 packet from DHCPv6 server",
254254
"DHCP4_DHCP4O6_RESPONSE_DATA", "%1: responding with packet %2 (type %3), packet details: %4",
255255
"DHCP4_DHCP4O6_SUBNET_DATA", "%1: the selected subnet details: %2",

src/bin/dhcp4/dhcp4_messages.mes

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,24 +22,24 @@ the server. In such an event, it would be necessary to manually remove
2222
the PID file. The first argument is the DHCPv4 process name, the
2323
second contains the PID and PID file.
2424

25-
% DHCP4_BUFFER_RECEIVED %1: received buffer from %2:%3 to %4:%5 over interface %6
25+
% DHCP4_BUFFER_RECEIVED received buffer from %1:%2 to %3:%4 over interface %5
2626
This debug message is logged when the server has received a packet
2727
over the socket. When the message is logged the contents of the received
2828
packet hasn't been parsed yet. The only available information is the
2929
interface and the source and destination IPv4 addresses/ports.
3030

31-
% DHCP4_BUFFER_RECEIVE_FAIL %1: error on attempt to receive packet: %2
31+
% DHCP4_BUFFER_RECEIVE_FAIL error on attempt to receive packet: %1
3232
The DHCPv4 server tried to receive a packet but an error
3333
occurred during this attempt. The reason for the error is included in
3434
the message.
3535

36-
% DHCP4_BUFFER_UNPACK %1: parsing buffer received from %2 to %3 over interface %4
36+
% DHCP4_BUFFER_UNPACK parsing buffer received from %1 to %2 over interface %3
3737
This debug message is issued when the server starts parsing the received
3838
buffer holding the DHCPv4 message. The arguments specify the source and
3939
destination IPv4 addresses as well as the interface over which the buffer has
4040
been received.
4141

42-
% DHCP4_BUFFER_WAIT_SIGNAL %1: signal received while waiting for next packet
42+
% DHCP4_BUFFER_WAIT_SIGNAL signal received while waiting for next packet
4343
This debug message is issued when the server was waiting for the
4444
packet, but the wait has been interrupted by the signal received
4545
by the process. The signal will be handled before the server starts
@@ -318,7 +318,7 @@ will be only able to offer global options - no addresses will be assigned.
318318
The argument specifies the client and transaction identification
319319
information.
320320

321-
% DHCP4_DHCP4O6_PACKET_RECEIVED %1: received DHCPv4o6 packet from DHCPv4 server (type %2) for %3 on interface %4
321+
% DHCP4_DHCP4O6_PACKET_RECEIVED received DHCPv4o6 packet from DHCPv4 server (type %1) for %2 on interface %3
322322
This debug message is printed when the server is receiving a DHCPv4o6
323323
from the DHCPv4 server over inter-process communication.
324324

@@ -333,7 +333,7 @@ This error is output if the IPv4 DHCP server fails to send an
333333
DHCPv4o6 message to the IPv6 DHCP server. The reason for the
334334
error is included in the message.
335335

336-
% DHCP4_DHCP4O6_RECEIVE_FAIL %1: failed to receive DHCPv4o6: %2
336+
% DHCP4_DHCP4O6_RECEIVE_FAIL failed to receive DHCPv4o6: %1
337337
This debug message indicates the inter-process communication with the
338338
DHCPv6 server failed. The reason for the error is included in
339339
the message.

src/bin/dhcp4/dhcp4_srv.cc

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1161,7 +1161,6 @@ void
11611161
Dhcpv4Srv::runOne() {
11621162
// client's message and server's response
11631163
Pkt4Ptr query;
1164-
string label = "[no hwaddr info], cid=[no info], tid=[no info]";
11651164

11661165
try {
11671166
// Set select() timeout to 1s. This value should not be modified
@@ -1177,9 +1176,7 @@ Dhcpv4Srv::runOne() {
11771176
// point are: the interface, source address and destination addresses
11781177
// and ports.
11791178
if (query) {
1180-
label = query->getLabel();
11811179
LOG_DEBUG(packet4_logger, DBG_DHCP4_BASIC, DHCP4_BUFFER_RECEIVED)
1182-
.arg(label)
11831180
.arg(query->getRemoteAddr().toText())
11841181
.arg(query->getRemotePort())
11851182
.arg(query->getLocalAddr().toText())
@@ -1199,12 +1196,10 @@ Dhcpv4Srv::runOne() {
11991196
// SIGINT, SIGHUP or SIGCHLD which are handled by the server. For
12001197
// signals that are not handled by the server we rely on the default
12011198
// behavior of the system.
1202-
LOG_DEBUG(packet4_logger, DBG_DHCP4_DETAIL, DHCP4_BUFFER_WAIT_SIGNAL)
1203-
.arg(label);
1199+
LOG_DEBUG(packet4_logger, DBG_DHCP4_DETAIL, DHCP4_BUFFER_WAIT_SIGNAL);
12041200
} catch (const std::exception& e) {
12051201
// Log all other errors.
12061202
LOG_ERROR(packet4_logger, DHCP4_BUFFER_RECEIVE_FAIL)
1207-
.arg(label)
12081203
.arg(e.what());
12091204
}
12101205

@@ -1331,7 +1326,6 @@ Dhcpv4Srv::processPacket(Pkt4Ptr query, bool allow_answer_park) {
13311326
if (!skip_unpack) {
13321327
try {
13331328
LOG_DEBUG(options4_logger, DBG_DHCP4_DETAIL, DHCP4_BUFFER_UNPACK)
1334-
.arg(query->getLabel())
13351329
.arg(query->getRemoteAddr().toText())
13361330
.arg(query->getLocalAddr().toText())
13371331
.arg(query->getIface());

src/bin/dhcp4/dhcp4to6_ipc.cc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ void Dhcp4to6Ipc::open() {
5555
void Dhcp4to6Ipc::handler(int /* fd */) {
5656
Dhcp4to6Ipc& ipc = Dhcp4to6Ipc::instance();
5757
Pkt6Ptr pkt;
58-
string label = "[no hwaddr info], cid=[no info], tid=[no info]";
5958

6059
try {
6160
LOG_DEBUG(packet4_logger, DBG_DHCP4_DETAIL, DHCP4_DHCP4O6_RECEIVING);
@@ -64,17 +63,14 @@ void Dhcp4to6Ipc::handler(int /* fd */) {
6463

6564
// From Dhcpv4Srv::runOne() after receivePacket()
6665
if (pkt) {
67-
label = pkt->getLabel();
6866
LOG_DEBUG(packet4_logger, DBG_DHCP4_BASIC, DHCP4_DHCP4O6_PACKET_RECEIVED)
69-
.arg(label)
7067
.arg(static_cast<int>(pkt->getType()))
7168
.arg(pkt->getRemoteAddr().toText())
7269
.arg(pkt->getRemotePort())
7370
.arg(pkt->getIface());
7471
}
7572
} catch (const std::exception& e) {
7673
LOG_DEBUG(packet4_logger, DBG_DHCP4_DETAIL, DHCP4_DHCP4O6_RECEIVE_FAIL)
77-
.arg(label)
7874
.arg(e.what());
7975
}
8076

src/bin/dhcp6/dhcp6_messages.cc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -188,9 +188,9 @@ const char* values[] = {
188188
"DHCP6_ADD_GLOBAL_STATUS_CODE", "%1: adding Status Code to DHCPv6 packet: %2",
189189
"DHCP6_ADD_STATUS_CODE_FOR_IA", "%1: adding Status Code to IA with iaid=%2: %3",
190190
"DHCP6_ALREADY_RUNNING", "%1 already running? %2",
191-
"DHCP6_BUFFER_RECEIVED", "%1: received buffer from %2:%3 to %4:%5 over interface %6",
192-
"DHCP6_BUFFER_UNPACK", "%1: parsing buffer received from %2 to %3 over interface %4",
193-
"DHCP6_BUFFER_WAIT_SIGNAL", "%1: signal received while waiting for next packet",
191+
"DHCP6_BUFFER_RECEIVED", "received buffer from %1:%2 to %3:%4 over interface %5",
192+
"DHCP6_BUFFER_UNPACK", "parsing buffer received from %1 to %2 over interface %3",
193+
"DHCP6_BUFFER_WAIT_SIGNAL", "signal received while waiting for next packet",
194194
"DHCP6_CB_ON_DEMAND_FETCH_UPDATES_FAIL", "error on demand attempt to fetch configuration updates from the configuration backend(s): %1",
195195
"DHCP6_CB_PERIODIC_FETCH_UPDATES_FAIL", "error on periodic attempt to fetch configuration updates from the configuration backend(s): %1",
196196
"DHCP6_CB_PERIODIC_FETCH_UPDATES_RETRIES_EXHAUSTED", "maximum number of configuration fetch attempts: 10, has been exhausted without success",
@@ -235,8 +235,8 @@ const char* values[] = {
235235
"DHCP6_DECLINE_PROCESS_IA", "Processing of IA (IAID: %1) from client %2 started.",
236236
"DHCP6_DEPRECATED", "The following mechanism is now deprecated and will be removed in the future: %1",
237237
"DHCP6_DEVELOPMENT_VERSION", "This software is a development branch of Kea. It is not recommended for production use.",
238-
"DHCP6_DHCP4O6_PACKET_RECEIVED", "%1: received DHCPv4o6 packet from DHCPv4 server (type %2) for %3 port %4 on interface %5",
239-
"DHCP6_DHCP4O6_RECEIVE_FAIL", "%1: failed to receive DHCPv4o6: %2",
238+
"DHCP6_DHCP4O6_PACKET_RECEIVED", "received DHCPv4o6 packet from DHCPv4 server (type %1) for %2 port %3 on interface %4",
239+
"DHCP6_DHCP4O6_RECEIVE_FAIL", "failed to receive DHCPv4o6: %1",
240240
"DHCP6_DHCP4O6_RECEIVING", "receiving DHCPv4o6 packet from DHCPv4 server",
241241
"DHCP6_DHCP4O6_RESPONSE_DATA", "%1: responding with packet %2 (type %3), packet details: %4",
242242
"DHCP6_DHCP4O6_SEND_FAIL", "%1: failed to send DHCPv4o6 packet: %2",
@@ -295,7 +295,7 @@ const char* values[] = {
295295
"DHCP6_PACKET_PROCESS_STD_EXCEPTION", "%1: exception occurred during packet processing: %2",
296296
"DHCP6_PACKET_QUEUE_FULL", "multi-threading packet queue is full",
297297
"DHCP6_PACKET_RECEIVED", "%1: %2 (type %3) received from %4 to %5 on interface %6",
298-
"DHCP6_PACKET_RECEIVE_FAIL", "%1: error on attempt to receive packet: %2",
298+
"DHCP6_PACKET_RECEIVE_FAIL", "error on attempt to receive packet: %1",
299299
"DHCP6_PACKET_SEND", "%1: trying to send packet %2 (type %3) from [%4]:%5 to [%6]:%7 on interface %8",
300300
"DHCP6_PACKET_SEND_FAIL", "%1: failed to send DHCPv6 packet: %2",
301301
"DHCP6_PACK_FAIL", "1%: failed to assemble response correctly: %2",

src/bin/dhcp6/dhcp6_messages.mes

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,19 +42,19 @@ the server. In such an event, it would be necessary to manually remove
4242
the PID file. The first argument is the DHCPv6 process name, the second
4343
contains the PID and PID file.
4444

45-
% DHCP6_BUFFER_RECEIVED %1: received buffer from %2:%3 to %4:%5 over interface %6
45+
% DHCP6_BUFFER_RECEIVED received buffer from %1:%2 to %3:%4 over interface %5
4646
This debug message is logged when the server has received a packet
4747
over the socket. When the message is logged the contents of the received
4848
packet hasn't been parsed yet. The only available information is the
4949
interface and the source and destination addresses/ports.
5050

51-
% DHCP6_BUFFER_UNPACK %1: parsing buffer received from %2 to %3 over interface %4
51+
% DHCP6_BUFFER_UNPACK parsing buffer received from %1 to %2 over interface %3
5252
This debug message is issued when the server starts parsing the received
5353
buffer holding the DHCPv6 message. The arguments specify the source and
5454
destination addresses as well as the interface over which the buffer has
5555
been received.
5656

57-
% DHCP6_BUFFER_WAIT_SIGNAL %1: signal received while waiting for next packet
57+
% DHCP6_BUFFER_WAIT_SIGNAL signal received while waiting for next packet
5858
This debug message is issued when the server was waiting for the
5959
packet, but the wait has been interrupted by the signal received
6060
by the process. The signal will be handled before the server starts
@@ -321,11 +321,11 @@ should plan your strategy to stop using it soon.
321321
This warning message is displayed when the version is a development
322322
(vs stable) one: the second number of the version is odd.
323323

324-
% DHCP6_DHCP4O6_PACKET_RECEIVED %1: received DHCPv4o6 packet from DHCPv4 server (type %2) for %3 port %4 on interface %5
324+
% DHCP6_DHCP4O6_PACKET_RECEIVED received DHCPv4o6 packet from DHCPv4 server (type %1) for %2 port %3 on interface %4
325325
This debug message is printed when the server is receiving a DHCPv4o6
326326
from the DHCPv4 server over inter-process communication.
327327

328-
% DHCP6_DHCP4O6_RECEIVE_FAIL %1: failed to receive DHCPv4o6: %2
328+
% DHCP6_DHCP4O6_RECEIVE_FAIL failed to receive DHCPv4o6: %1
329329
This debug message indicates the inter-process communication with the
330330
DHCPv4 server failed. The reason for the error is included in
331331
the message.
@@ -682,7 +682,7 @@ respectively. The remaining arguments specify the source address,
682682
destination IP address and the name of the interface on which the
683683
message has been received.
684684

685-
% DHCP6_PACKET_RECEIVE_FAIL %1: error on attempt to receive packet: %2
685+
% DHCP6_PACKET_RECEIVE_FAIL error on attempt to receive packet: %1
686686
The IPv6 DHCP server tried to receive a packet but an error
687687
occurred during this attempt. The reason for the error is included in
688688
the message.

src/bin/dhcp6/dhcp6_srv.cc

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -642,7 +642,6 @@ void
642642
Dhcpv6Srv::runOne() {
643643
// client's message and server's response
644644
Pkt6Ptr query;
645-
string label = "duid=[no info], [no hwaddr info], tid=[no info]";
646645

647646
try {
648647
// Set select() timeout to 1s. This value should not be modified
@@ -658,9 +657,7 @@ Dhcpv6Srv::runOne() {
658657
// point are: the interface, source address and destination addresses
659658
// and ports.
660659
if (query) {
661-
label = query->getLabel();
662660
LOG_DEBUG(packet6_logger, DBG_DHCP6_BASIC, DHCP6_BUFFER_RECEIVED)
663-
.arg(label)
664661
.arg(query->getRemoteAddr().toText())
665662
.arg(query->getRemotePort())
666663
.arg(query->getLocalAddr().toText())
@@ -686,10 +683,9 @@ Dhcpv6Srv::runOne() {
686683
// SIGINT, SIGHUP or SIGCHLD which are handled by the server. For
687684
// signals that are not handled by the server we rely on the default
688685
// behavior of the system.
689-
LOG_DEBUG(packet6_logger, DBG_DHCP6_DETAIL, DHCP6_BUFFER_WAIT_SIGNAL).arg(label);
686+
LOG_DEBUG(packet6_logger, DBG_DHCP6_DETAIL, DHCP6_BUFFER_WAIT_SIGNAL);
690687
} catch (const std::exception& e) {
691688
LOG_ERROR(packet6_logger, DHCP6_PACKET_RECEIVE_FAIL)
692-
.arg(label)
693689
.arg(e.what());
694690
}
695691

@@ -815,7 +811,6 @@ Dhcpv6Srv::processPacket(Pkt6Ptr query) {
815811
if (!skip_unpack) {
816812
try {
817813
LOG_DEBUG(options6_logger, DBG_DHCP6_DETAIL, DHCP6_BUFFER_UNPACK)
818-
.arg(query->getLabel())
819814
.arg(query->getRemoteAddr().toText())
820815
.arg(query->getLocalAddr().toText())
821816
.arg(query->getIface());

src/bin/dhcp6/dhcp6to4_ipc.cc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,25 +57,21 @@ void Dhcp6to4Ipc::open() {
5757
void Dhcp6to4Ipc::handler(int /* fd */) {
5858
Dhcp6to4Ipc& ipc = Dhcp6to4Ipc::instance();
5959
Pkt6Ptr pkt;
60-
string label = "duid=[no info], [no hwaddr info], tid=[no info]";
6160

6261
try {
6362
LOG_DEBUG(packet6_logger, DBG_DHCP6_DETAIL, DHCP6_DHCP4O6_RECEIVING);
6463
// Receive message from IPC.
6564
pkt = ipc.receive();
6665

6766
if (pkt) {
68-
label = pkt->getLabel();
6967
LOG_DEBUG(packet6_logger, DBG_DHCP6_BASIC, DHCP6_DHCP4O6_PACKET_RECEIVED)
70-
.arg(label)
7168
.arg(static_cast<int>(pkt->getType()))
7269
.arg(pkt->getRemoteAddr().toText())
7370
.arg(pkt->getRemotePort())
7471
.arg(pkt->getIface());
7572
}
7673
} catch (const std::exception& e) {
7774
LOG_DEBUG(packet6_logger,DBG_DHCP6_DETAIL, DHCP6_DHCP4O6_RECEIVE_FAIL)
78-
.arg(label)
7975
.arg(e.what());
8076
}
8177

0 commit comments

Comments
 (0)