We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c221139 commit 3850ad9Copy full SHA for 3850ad9
lightningd/log.c
@@ -207,7 +207,7 @@ static void log_to_files(const char *log_prefix,
207
struct log_file **log_files)
208
{
209
char tstamp[sizeof("YYYY-mm-ddTHH:MM:SS.nnnZ ")];
210
- char *entry, *nodestr;
+ char *entry, nodestr[hex_str_size(PUBKEY_CMPR_LEN)];
211
bool filtered;
212
213
if (print_timestamps) {
@@ -218,9 +218,10 @@ static void log_to_files(const char *log_prefix,
218
tstamp[0] = '\0';
219
220
if (node_id)
221
- nodestr = fmt_node_id(tmpctx, node_id);
+ hex_encode(node_id->k, sizeof(node_id->k),
222
+ nodestr, sizeof(nodestr));
223
else
- nodestr = "";
224
+ nodestr[0] = '\0';
225
if (level == LOG_IO_IN || level == LOG_IO_OUT) {
226
const char *dir = level == LOG_IO_IN ? "[IN]" : "[OUT]";
227
char *hex = tal_hexstr(NULL, io, io_len);
0 commit comments