77#define ZEPHYR_INCLUDE_LOGGING_LOG_CORE_H_
88
99#include <logging/log_msg.h>
10- #include <logging/log_core2 .h>
10+ #include <logging/log_msg2 .h>
1111#include <logging/log_instance.h>
1212#include <stdbool.h>
1313#include <stdint.h>
1414#include <stdarg.h>
1515#include <syscall.h>
1616#include <sys/util.h>
1717
18+ /* This header file keeps all macros and functions needed for creating logging
19+ * messages (macros like @ref LOG_ERR).
20+ */
1821#define LOG_LEVEL_NONE 0U
1922#define LOG_LEVEL_ERR 1U
2023#define LOG_LEVEL_WRN 2U
@@ -481,27 +484,6 @@ enum log_strdup_action {
481484 LOG_LEVEL_INTERNAL_RAW_STRING, NULL, 0, __VA_ARGS__);\
482485} while (0)
483486
484-
485- /** @brief Get name of the log source.
486- *
487- * @param source_id Source ID.
488- * @return Name.
489- */
490- static inline const char * log_name_get (uint32_t source_id )
491- {
492- return __log_const_start [source_id ].name ;
493- }
494-
495- /** @brief Get compiled level of the log source.
496- *
497- * @param source_id Source ID.
498- * @return Level.
499- */
500- static inline uint8_t log_compiled_level_get (uint32_t source_id )
501- {
502- return __log_const_start [source_id ].level ;
503- }
504-
505487/** @brief Get index of the log source based on the address of the constant data
506488 * associated with the source.
507489 *
@@ -516,12 +498,6 @@ static inline uint32_t log_const_source_id(
516498 sizeof (struct log_source_const_data );
517499}
518500
519- /** @brief Get number of registered sources. */
520- static inline uint32_t log_sources_count (void )
521- {
522- return log_const_source_id (__log_const_end );
523- }
524-
525501extern struct log_source_dynamic_data __log_dynamic_start [];
526502extern struct log_source_dynamic_data __log_dynamic_end [];
527503
@@ -534,17 +510,6 @@ extern struct log_source_dynamic_data __log_dynamic_end[];
534510#define LOG_INSTANCE_DYNAMIC_DATA (_module_name , _inst ) \
535511 LOG_ITEM_DYNAMIC_DATA(LOG_INSTANCE_FULL_NAME(_module_name, _inst))
536512
537- /** @brief Get pointer to the filter set of the log source.
538- *
539- * @param source_id Source ID.
540- *
541- * @return Pointer to the filter set.
542- */
543- static inline uint32_t * log_dynamic_filters_get (uint32_t source_id )
544- {
545- return & __log_dynamic_start [source_id ].filters ;
546- }
547-
548513/** @brief Get index of the log source based on the address of the dynamic data
549514 * associated with the source.
550515 *
@@ -558,12 +523,6 @@ static inline uint32_t log_dynamic_source_id(struct log_source_dynamic_data *dat
558523 sizeof (struct log_source_dynamic_data );
559524}
560525
561- /* Initialize runtime filters */
562- void z_log_runtime_filters_init (void );
563-
564- /* Notify log_core that a backend was enabled. */
565- void z_log_notify_backend_enabled (void );
566-
567526/** @brief Dummy function to trigger log messages arguments type checking. */
568527static inline __printf_like (1 , 2 )
569528void z_log_printf_arg_checker (const char * fmt , ...)
@@ -710,49 +669,6 @@ void log_generic_from_user(struct log_msg_ids src_level,
710669 */
711670bool log_is_strdup (const void * buf );
712671
713- /** @brief Free allocated buffer.
714- *
715- * @param buf Buffer.
716- */
717- void log_free (void * buf );
718-
719- /**
720- * @brief Get current number of allocated buffers for string duplicates.
721- */
722- uint32_t log_get_strdup_pool_current_utilization (void );
723-
724- /**
725- * @brief Get maximal number of simultaneously allocated buffers for string
726- * duplicates.
727- *
728- * Value can be used to determine pool size.
729- */
730- uint32_t log_get_strdup_pool_utilization (void );
731-
732- /**
733- * @brief Get length of the longest string duplicated.
734- *
735- * Value can be used to determine buffer size in the string duplicates pool.
736- */
737- uint32_t log_get_strdup_longest_string (void );
738-
739- /** @brief Indicate to the log core that one log message has been dropped.
740- */
741- void z_log_dropped (void );
742-
743- /** @brief Read and clear current drop indications counter.
744- *
745- * @return Dropped count.
746- */
747- uint32_t z_log_dropped_read_and_clear (void );
748-
749- /** @brief Check if there are any pending drop notifications.
750- *
751- * @retval true Pending unreported drop indications.
752- * @retval false No pending unreported drop indications.
753- */
754- bool z_log_dropped_pending (void );
755-
756672/** @brief Log a message from user mode context.
757673 *
758674 * @note This function is intended to be used internally
0 commit comments