diff --git a/subsys/net/ip/net_pkt.c b/subsys/net/ip/net_pkt.c index 9cf619f142e..cb5a54caec3 100644 --- a/subsys/net/ip/net_pkt.c +++ b/subsys/net/ip/net_pkt.c @@ -1151,9 +1151,10 @@ int net_pkt_alloc_buffer(struct net_pkt *pkt, if (!buf) { #if NET_LOG_LEVEL >= LOG_LEVEL_DBG - NET_ERR("Data buffer allocation failed (%s:%d)", caller, line); + NET_ERR("Data buffer (%zd) allocation failed (%s:%d)", + alloc_len, caller, line); #else - NET_ERR("Data buffer allocation failed."); + NET_ERR("Data buffer (%zd) allocation failed.", alloc_len); #endif return -ENOMEM; }