diff options
author | Benny Prijono <bennylp@teluu.com> | 2007-08-30 09:35:10 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2007-08-30 09:35:10 +0000 |
commit | 29394e589fd7af5f6459b72f153f571cd36f58f4 (patch) | |
tree | 2fc0787f2e3d7c109e0bc1526565ad50b7f28cf0 | |
parent | dd175b64509a079ee5167a397dc8b7b0ac3ced99 (diff) |
Fixed ticket #365: couple of minor bugs with log decoration (thanks Thiago Paiva Flores)
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@1425 74dad513-b988-da41-8d7b-12977e46ad98
-rw-r--r-- | pjlib/src/pj/log.c | 2 | ||||
-rw-r--r-- | pjsip/src/pjsua-lib/pjsua_core.c | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/pjlib/src/pj/log.c b/pjlib/src/pj/log.c index 59e8956f..ef93fa3c 100644 --- a/pjlib/src/pj/log.c +++ b/pjlib/src/pj/log.c @@ -102,7 +102,7 @@ PJ_DEF(void) pj_log( const char *sender, int level, } if (log_decor & PJ_LOG_HAS_MONTH) { *pre++ = '-'; - pre += pj_utoa_pad(ptime.mon, pre, 2, '0'); + pre += pj_utoa_pad(ptime.mon+1, pre, 2, '0'); } if (log_decor & PJ_LOG_HAS_DAY_OF_MON) { *pre++ = ' '; diff --git a/pjsip/src/pjsua-lib/pjsua_core.c b/pjsip/src/pjsua-lib/pjsua_core.c index 61d49c39..90e8380c 100644 --- a/pjsip/src/pjsua-lib/pjsua_core.c +++ b/pjsip/src/pjsua-lib/pjsua_core.c @@ -437,6 +437,9 @@ PJ_DEF(pj_status_t) pjsua_reconfigure_logging(const pjsua_logging_config *cfg) /* Redirect log function to ours */ pj_log_set_log_func( &log_writer ); + /* Set decor */ + pj_log_set_decor(pjsua_var.log_cfg.decor); + /* Close existing file, if any */ if (pjsua_var.log_file) { pj_file_close(pjsua_var.log_file); |