43#include "udifcommon.h"
77#define UDIF_LOGGING_MESSAGE_MAX 256U
82#define UDIF_LOG_STRING_DEPTH 69U
87#define UDIF_LOG_STRING_SIZE 64U
92static const char UDIF_LOGGER_PATH[] =
"UDIF";
97static const char UDIF_LOGGER_FILE[] =
"udif.log";
102static const char UDIF_LOGGER_HEAD[] =
"UDIF Version 1.0";
252UDIF_EXPORT_API int64_t
udif_logger_read_line(
const char* path,
char* output,
size_t outlen,
size_t linenum);
The UDIF command enumerations.
udif_application_messages
The ARS application messages.
Definition commands.h:73
UDIF_EXPORT_API size_t udif_logger_write_decorated_time_stamped_message(const char *path, udif_application_messages msgtype, const char *message, size_t msglen)
Write a decorated, time-stamped message to the log file.
Definition logger.c:210
UDIF_EXPORT_API size_t udif_logger_get_size(const char *path)
Get the size of the log file.
Definition logger.c:113
UDIF_EXPORT_API size_t udif_logger_read_all(const char *path, char *output, size_t outlen)
Read the entire log into a character array.
Definition logger.c:268
UDIF_EXPORT_API bool udif_logger_erase_all(const char *path)
Erase the log file.
Definition logger.c:73
UDIF_EXPORT_API size_t udif_logger_write_time_stamped_message(const char *path, const char *message, size_t msglen)
Write a time-stamped message to the log file.
Definition logger.c:238
UDIF_EXPORT_API size_t udif_logger_time_stamp(char *output, size_t outlen)
Write a timestamp to a string.
Definition logger.c:318
UDIF_EXPORT_API void udif_logger_reset(const char *path)
Reset the logger.
Definition logger.c:132
UDIF_EXPORT_API void udif_logger_initialize(const char *path)
Initialize the logger.
Definition logger.c:39
UDIF_EXPORT_API size_t udif_logger_write_message(const char *path, const char *line, size_t linelen)
Write a message to the log file.
Definition logger.c:149
UDIF_EXPORT_API size_t udif_logger_write_decorated_message(const char *path, udif_application_messages msgtype, const char *message, size_t msglen)
Write a decorated message to the log file.
Definition logger.c:180
UDIF_EXPORT_API void logger_default_path(char *path, size_t pathlen)
Get the default logging path.
Definition logger.c:12
UDIF_EXPORT_API int64_t udif_logger_read_line(const char *path, char *output, size_t outlen, size_t linenum)
Read a single line from the log file.
Definition logger.c:293
UDIF_EXPORT_API bool udif_logger_exists(const char *path)
Check if the log file exists.
Definition logger.c:94
UDIF_EXPORT_API bool udif_logger_dispose(const char *path)
Erase and delete the log file.
Definition logger.c:52