summaryrefslogtreecommitdiff
path: root/gpg_wrapper.cpp
diff options
context:
space:
mode:
authorGluzskiy Alexandr <sss123next@list.ru>2010-08-30 23:06:15 +0300
committerGluzskiy Alexandr <sss123next@list.ru>2010-08-30 23:06:15 +0300
commitbef8e360e5e40ee4e8648a5c56b2fae3fefb1c0a (patch)
tree4db038ab8bc14390b24caeea75cfd48845bfc782 /gpg_wrapper.cpp
parentc0b213bd890aef062faadf1701df1959c9f73816 (diff)
better logging
Diffstat (limited to 'gpg_wrapper.cpp')
-rw-r--r--gpg_wrapper.cpp15
1 files changed, 3 insertions, 12 deletions
diff --git a/gpg_wrapper.cpp b/gpg_wrapper.cpp
index 1a29440..fa8c8f7 100644
--- a/gpg_wrapper.cpp
+++ b/gpg_wrapper.cpp
@@ -21,8 +21,7 @@
pxResult pxExecute(wstring *acommandline, char *ainput, string *aoutput, LPDWORD aexitcode, pxResult *result)
{
- extern bool bDebugLog;
- extern fstream debuglog;
+ extern logtofile debuglog;
BOOL success;
STARTUPINFO sinfo = {0};
SECURITY_ATTRIBUTES sattrs = {0};
@@ -87,12 +86,7 @@ pxResult pxExecute(wstring *acommandline, char *ainput, string *aoutput, LPDWORD
mir_free(home_dir);
}
- if(bDebugLog)
- {
- char* tmp = mir_utf8encodeW(commandline.c_str());
- debuglog<<"in: "<<tmp<<"\n";
- mir_free(tmp);
- }
+ debuglog<<"in: "<<commandline<<"\n";
TCHAR chNewEnv[128];
LPTSTR lpszCurrentVariable;
@@ -132,10 +126,7 @@ pxResult pxExecute(wstring *acommandline, char *ainput, string *aoutput, LPDWORD
storeOutput(readstdout,aoutput);
- if(bDebugLog)
- {
- debuglog<<"out: "<<aoutput->c_str()<<"\n";
- }
+ debuglog<<"out: "<<aoutput->c_str()<<"\n";
WaitForSingleObject(pri.hProcess,INFINITE);