samples: net: eth_native_posix: Convert to new logging system

Use new logging system with support for network log level.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This commit is contained in:
Jukka Rissanen 2018-08-06 14:10:45 +03:00
parent 85e7610fab
commit be7ea732e4
2 changed files with 7 additions and 14 deletions

View file

@ -9,10 +9,8 @@ CONFIG_ENTROPY_GENERATOR=y
CONFIG_TEST_RANDOM_GENERATOR=y
CONFIG_INIT_STACKS=y
CONFIG_SYS_LOG=y
CONFIG_SYS_LOG_SHOW_COLOR=y
CONFIG_NET_LOG=y
CONFIG_SYS_LOG_NET_LEVEL=4
CONFIG_LOG=y
CONFIG_NET_STATISTICS=y
@ -27,17 +25,10 @@ CONFIG_NET_MAX_CONTEXTS=10
CONFIG_NET_SHELL=y
CONFIG_NET_DEBUG_CORE=n
CONFIG_NET_DEBUG_L2_ETHERNET=n
CONFIG_NET_DEBUG_IF=n
CONFIG_NET_DEBUG_IPV6=n
CONFIG_NET_DEBUG_NET_PKT=y
CONFIG_NET_CONFIG_SETTINGS=y
CONFIG_NET_CONFIG_NEED_IPV6=y
CONFIG_NET_CONFIG_NEED_IPV4=y
CONFIG_NET_APP_SERVER=y
CONFIG_NET_DEBUG_APP=n
CONFIG_NET_CONFIG_MY_IPV6_ADDR="2001:db8::1"
CONFIG_NET_CONFIG_PEER_IPV6_ADDR="2001:db8::2"
CONFIG_NET_CONFIG_MY_IPV4_ADDR="192.0.2.1"
@ -46,6 +37,5 @@ CONFIG_NET_CONFIG_PEER_IPV4_ADDR="192.0.2.2"
CONFIG_NET_L2_ETHERNET=y
CONFIG_ETH_NATIVE_POSIX=y
CONFIG_SYS_LOG_ETHERNET_LEVEL=1
CONFIG_ETH_NATIVE_POSIX_RANDOM_MAC=y
#CONFIG_ETH_NATIVE_POSIX_MAC_ADDR="00:00:5e:00:53:2a"

View file

@ -4,15 +4,18 @@
* SPDX-License-Identifier: Apache-2.0
*/
#define LOG_MODULE_NAME net_native_posix
#define NET_LOG_LEVEL LOG_LEVEL_DBG
#include <zephyr.h>
#include <logging/sys_log.h>
#include <errno.h>
#include <board.h>
#include <net/net_core.h>
/* This application itself does nothing as there is net-shell that can be used
* to monitor things.
*/
void main(void)
{
SYS_LOG_INF("Start application");
NET_INFO("Start application");
}