aboutsummaryrefslogtreecommitdiffstats
path: root/Source/charon/utils/logger.c
diff options
context:
space:
mode:
authorMartin Willi <martin@strongswan.org>2006-03-30 07:22:01 +0000
committerMartin Willi <martin@strongswan.org>2006-03-30 07:22:01 +0000
commitefadbf79e9c864578bfd1277d824e69b2989aac5 (patch)
treecf5cde05d140a07f2ffe21c8e61a47610199145b /Source/charon/utils/logger.c
parent9c781c152ad66a73139447e40a2081c38080c651 (diff)
downloadstrongswan-efadbf79e9c864578bfd1277d824e69b2989aac5.tar.bz2
strongswan-efadbf79e9c864578bfd1277d824e69b2989aac5.tar.xz
- rewrote a lot of RSA stuff
- done major work for ASN1/decoder - allow loading of ASN1 der encoded private keys, public keys and certificates - extracting public key from certificates - passing certificates from stroke to charon => basic authentication with RSA certificates works!
Diffstat (limited to 'Source/charon/utils/logger.c')
-rw-r--r--Source/charon/utils/logger.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/Source/charon/utils/logger.c b/Source/charon/utils/logger.c
index 51efa2b8c..c66de481e 100644
--- a/Source/charon/utils/logger.c
+++ b/Source/charon/utils/logger.c
@@ -192,7 +192,7 @@ static void log_bytes(private_logger_t *this, log_level_t loglevel, char *label,
pthread_mutex_lock(&mutex);
- format = "%s (%d bytes)";
+ format = "%s (%d bytes @%p)";
this->prepend_prefix(this, loglevel, format, buffer);
if (this->output == NULL)
@@ -201,7 +201,7 @@ static void log_bytes(private_logger_t *this, log_level_t loglevel, char *label,
}
else
{
- fprintf(this->output, buffer, label, len);
+ fprintf(this->output, buffer, label, len, bytes);
fprintf(this->output, "\n");
}
@@ -294,6 +294,14 @@ static void disable_level(private_logger_t *this, log_level_t log_level)
}
/**
+ * Implementation of logger_t.set_output.
+ */
+static void set_output(private_logger_t *this, FILE * output)
+{
+ this->output = output;
+}
+
+/**
* Implementation of logger_t.get_level.
*/
static log_level_t get_level(private_logger_t *this)
@@ -324,6 +332,7 @@ logger_t *logger_create(char *logger_name, log_level_t log_level, bool log_threa
this->public.enable_level = (void(*)(logger_t*,log_level_t))enable_level;
this->public.disable_level = (void(*)(logger_t*,log_level_t))disable_level;
this->public.get_level = (log_level_t(*)(logger_t*))get_level;
+ this->public.set_output = (void(*)(logger_t*,FILE*))set_output;
this->public.destroy = (void(*)(logger_t*))destroy;
/* private functions */