2018-12-13 04:51:03 +00:00
|
|
|
/* SPDX-License-Identifier: MIT
|
|
|
|
*
|
2020-12-04 11:15:29 +00:00
|
|
|
* Copyright © 2018-2020 WireGuard LLC. All Rights Reserved.
|
2018-12-13 04:51:03 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef RINGLOGGER_H
|
|
|
|
#define RINGLOGGER_H
|
|
|
|
|
2019-03-17 06:41:10 +00:00
|
|
|
#include <stdint.h>
|
|
|
|
|
2018-12-13 14:26:04 +00:00
|
|
|
struct log;
|
2019-03-17 06:41:10 +00:00
|
|
|
void write_msg_to_log(struct log *log, const char *tag, const char *msg);
|
|
|
|
int write_log_to_file(const char *file_name, const struct log *input_log);
|
2019-04-10 10:28:00 +00:00
|
|
|
uint32_t view_lines_from_cursor(const struct log *input_log, uint32_t cursor, void *ctx, void(*)(const char *, uint64_t, void *));
|
2018-12-13 04:51:03 +00:00
|
|
|
struct log *open_log(const char *file_name);
|
2018-12-13 14:26:04 +00:00
|
|
|
void close_log(struct log *log);
|
2018-12-13 04:51:03 +00:00
|
|
|
|
|
|
|
#endif
|