diff --git a/sys/netgraph/netflow/netflow.c b/sys/netgraph/netflow/netflow.c index c5bfe2bbffc1..7dc34be7c203 100644 --- a/sys/netgraph/netflow/netflow.c +++ b/sys/netgraph/netflow/netflow.c @@ -34,6 +34,7 @@ static const char rcs_id[] = #include #include #include +#include #include #include @@ -587,7 +588,8 @@ export_send(priv_p priv) header->count = htons(header->count); if ((m = m_devget((caddr_t)header, mlen, 0, NULL, NULL)) == NULL) { - printf("ng_netflow: m_devget() failed, losing export dgram\n"); + log(LOG_CRIT, "ng_netflow: m_devget() failed, losing export " + "dgram\n"); header->count = 0; return(ENOBUFS); } @@ -671,7 +673,8 @@ ng_netflow_expire(void *arg) */ if ((error = export_add(priv, fle)) != 0) - printf("ng_netflow: export_add() failed: %u\n", error); + log(LOG_CRIT, "ng_netflow: export_add() failed: %u\n", + error); (void )free_flow(priv, fle); mtx_lock(&priv->expire_mtx); @@ -710,8 +713,8 @@ ng_netflow_expire(void *arg) mtx_unlock(&priv->work_mtx); if ((error = export_add(priv, fle)) != 0) - printf("ng_netflow: export_add() failed: %u\n", - error); + log(LOG_CRIT, "ng_netflow: export_add() " + "failed: %u\n", error); used = free_flow(priv, fle); diff --git a/sys/netgraph/netflow/ng_netflow.c b/sys/netgraph/netflow/ng_netflow.c index 8b61d97ab1da..5dd6d2b905b4 100644 --- a/sys/netgraph/netflow/ng_netflow.c +++ b/sys/netgraph/netflow/ng_netflow.c @@ -35,6 +35,7 @@ static const char rcs_id[] = #include #include #include +#include #include #include @@ -417,7 +418,7 @@ ng_netflow_rcvdata (hook_p hook, item_p item) * Data arrived on export hook. * This must not happen. */ - printf("ng_netflow: incoming data on export hook!\n"); + log(LOG_ERR, "ng_netflow: incoming data on export hook!\n"); ERROUT(EINVAL); };