Add log_ssl() and some cleanups
This commit is contained in:
@@ -2,14 +2,15 @@
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <pthread.h>
|
||||
#include <openssl/err.h>
|
||||
#include "log_trace.h"
|
||||
#include "confparser.h"
|
||||
|
||||
static FILE *fderr = NULL;
|
||||
static FILE *fdout = NULL;
|
||||
static pthread_once_t once = PTHREAD_ONCE_INIT;
|
||||
static void open_logs(void)
|
||||
|
||||
static void open_logs(void)
|
||||
{
|
||||
if (conf.rmps.errlog)
|
||||
fderr = fopen(conf.rmps.errlog, "a");
|
||||
@@ -17,6 +18,12 @@ static void open_logs(void)
|
||||
fdout = fopen(conf.rmps.logfile, "a");
|
||||
}
|
||||
|
||||
void log_ssl()
|
||||
{
|
||||
ERR_print_errors_fp(fderr);
|
||||
fflush(fderr);
|
||||
}
|
||||
|
||||
void log_trace(LOG_LEVEL lvl, char *fmt, ... )
|
||||
{
|
||||
LOG_LEVEL cur_lvl = conf.rmps.loglevel - '0';
|
||||
|
||||
Reference in New Issue
Block a user