Log Files

%CODE{"c++"}% // Comment out to stop logging #define logging

// Logfile #ifdef logging const char* LogFile = "/tmp/skonsslookup.log"; ofstream logFile; #define log(message) logFile << message << endl #else #define log(message) #endif

// In the mainline of the program #ifdef logging logFile.open(LogFile,ios::out); #endif

// Writing a log message log("Request: "+searchString); %ENDCODE%

Edit | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r1 - 2015-03-30 - JimSkon
  • Edit
  • Attach
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2021 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback