Skip to content
Snippets Groups Projects
Commit e6cd4557 authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Kirill Yukhin
Browse files

core/say: Export logger fd


We need it inside popen engine to be able to print
errors from inside of a child process.

Signed-off-by: default avatarCyrill Gorcunov <gorcunov@gmail.com>
parent afe4007d
No related branches found
No related tags found
No related merge requests found
......@@ -168,6 +168,12 @@ log_type()
return log_default->type;
}
int
log_get_fd(void)
{
return log_default->fd;
}
void
log_set_level(struct log *log, enum say_level level)
{
......
......@@ -144,6 +144,7 @@ typedef int (*log_format_func_t)(struct log *log, char *buf, int len, int level,
* A log object. There is a singleton for the default log.
*/
struct log {
/** The current file descriptor. */
int fd;
/** The current log level. */
int level;
......@@ -202,6 +203,12 @@ log_say(struct log *log, int level, const char *filename,
enum say_logger_type
log_type();
/**
* Default logger file descriptor.
*/
int
log_get_fd(void);
/**
* Set log level. Can be used dynamically.
*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment