nRF Connect SDK API 3.3.99
Loading...
Searching...
No Matches
nrf_cloud_log.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2023 Nordic Semiconductor ASA
3 *
4 * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5 */
6
7#ifndef NRF_CLOUD_LOG_H_
8#define NRF_CLOUD_LOG_H_
9
14#include <zephyr/logging/log.h>
15
16#ifdef __cplusplus
17extern "C" {
18#endif
19
30
47
61void nrf_cloud_log_enable(bool enable);
62
69
79void nrf_cloud_log_control_set(int log_level);
80
87
94
101
102#if defined(CONFIG_NRF_CLOUD_LOG_DIRECT)
103
104#if defined(CONFIG_NRF_CLOUD_MQTT) || defined(CONFIG_NRF_CLOUD_COAP)
115int nrf_cloud_log_send(int log_level, const char *fmt, ...);
116#endif /* CONFIG_NRF_CLOUD_MQTT || CONFIG_NRF_CLOUD_COAP */
117
118#else /* CONFIG_NRF_CLOUD_LOG_DIRECT */
119#define nrf_cloud_log_send(log_level, fmt, ...) (0)
120#endif /* CONFIG_NRF_CLOUD_LOG_DIRECT */
121
124#ifdef __cplusplus
125}
126#endif
127
128#endif /* NRF_CLOUD_LOG_H_ */
bool nrf_cloud_is_dict_logging_enabled(void)
Determine if build is configured for dictionary (binary) logging.
int nrf_cloud_log_control_get(void)
Get current log level for logging to nRF Cloud.
void nrf_cloud_log_level_set(int level)
Set the logging level.
bool nrf_cloud_is_text_logging_enabled(void)
Determine if build is configured for text (JSON) cloud logging.
void nrf_cloud_log_init(void)
Initialize the nRF Cloud logging subsystem. Call after the date_time library is ready.
bool nrf_cloud_log_is_enabled(void)
Find out if logger is enabled.
void nrf_cloud_log_enable(bool enable)
Enable or disable logging to the cloud.
void nrf_cloud_log_control_set(int log_level)
Control nRF Cloud logging.
#define nrf_cloud_log_send(log_level, fmt,...)
Definition nrf_cloud_log.h:119