diff options
| author | jmagne <jmagne@c9f7a03b-bd48-0410-a16d-cbbf54688b0b> | 2011-08-01 23:41:04 +0000 |
|---|---|---|
| committer | jmagne <jmagne@c9f7a03b-bd48-0410-a16d-cbbf54688b0b> | 2011-08-01 23:41:04 +0000 |
| commit | 37a77d6960db1339682d4f025bd36919c4f679b8 (patch) | |
| tree | 0fba2f38ba214f90c723ee4540ea2f33d54144b4 /pki/base/tps/src/main/LogFile.cpp | |
| parent | 18d00cef9fd603a167382f01f294a27ae5bffeb8 (diff) | |
Fix Bugzilla Bug# 725572 - Starting TPS subsystem with no pre-existing audit log file does not write audit messages.
git-svn-id: svn+ssh://svn.fedorahosted.org/svn/pki/trunk@2089 c9f7a03b-bd48-0410-a16d-cbbf54688b0b
Diffstat (limited to 'pki/base/tps/src/main/LogFile.cpp')
| -rw-r--r-- | pki/base/tps/src/main/LogFile.cpp | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/pki/base/tps/src/main/LogFile.cpp b/pki/base/tps/src/main/LogFile.cpp index e2dec7026..d908ca0c5 100644 --- a/pki/base/tps/src/main/LogFile.cpp +++ b/pki/base/tps/src/main/LogFile.cpp @@ -30,6 +30,7 @@ extern "C" { #endif +#include <unistd.h> #include <stdio.h> #include <stdarg.h> #include <stdlib.h> @@ -98,8 +99,8 @@ void LogFile::shutdown() { m_ctx->LogInfo( "LogFile::shutdown", __LINE__, - "thread = 0x%lx: Logfile %s shutting down", - PR_GetCurrentThread(), m_fname); + "thread = 0x%lx: Logfile %s shutting down pid: %d", + PR_GetCurrentThread(), m_fname,getpid()); PR_EnterMonitor(m_monitor); if (m_fd != NULL) { @@ -124,13 +125,20 @@ int LogFile::open() { PRFileInfo info; PR_EnterMonitor(m_monitor); + + m_ctx->LogInfo( "LogFile::open", + __LINE__, + "Opening Log File: %s pid: %d", + m_fname,getpid()); + if (m_fd == NULL) { m_fd = PR_Open(m_fname, PR_RDWR | PR_CREATE_FILE | PR_APPEND, 440|200); if (m_fd == NULL) { m_ctx->LogError( "LogFile::open", __LINE__, - "Unable to open log file %s", - m_fname); + "Unable to open log file %s error no: %d", + m_fname,PR_GetError()); + goto loser; } |
