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