diff options
author | Gleb Smirnoff <glebius@FreeBSD.org> | 2005-01-20 13:28:39 +0000 |
---|---|---|
committer | Gleb Smirnoff <glebius@FreeBSD.org> | 2005-01-20 13:28:39 +0000 |
commit | 18c54fe665aaf6c50750c9a4bfd77453c3a95785 (patch) | |
tree | 1941a84fe619fb0e80fe873d2472c592909a6af8 /sys/netgraph | |
parent | 951e4d1c91d5ab16be4356093ad4acc6ce5dda60 (diff) | |
download | src-18c54fe665aaf6c50750c9a4bfd77453c3a95785.tar.gz src-18c54fe665aaf6c50750c9a4bfd77453c3a95785.zip |
Use log() instead of printf(), to reduce flood on console.
MFC after: 1 week
Notes
Notes:
svn path=/head/; revision=140511
Diffstat (limited to 'sys/netgraph')
-rw-r--r-- | sys/netgraph/netflow/netflow.c | 11 | ||||
-rw-r--r-- | sys/netgraph/netflow/ng_netflow.c | 3 |
2 files changed, 9 insertions, 5 deletions
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 <sys/kernel.h> #include <sys/limits.h> #include <sys/mbuf.h> +#include <sys/syslog.h> #include <sys/systm.h> #include <sys/socket.h> @@ -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 <sys/kernel.h> #include <sys/mbuf.h> #include <sys/socket.h> +#include <sys/syslog.h> #include <sys/ctype.h> #include <net/if.h> @@ -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); }; |