Annotation of truecrypt/platform/systemlog.h, revision 1.1.1.2

1.1       root        1: /*
                      2:  Copyright (c) 2008 TrueCrypt Foundation. All rights reserved.
                      3: 
1.1.1.2 ! root        4:  Governed by the TrueCrypt License 2.5 the full text of which is contained
1.1       root        5:  in the file License.txt included in TrueCrypt binary and source code
                      6:  distribution packages.
                      7: */
                      8: 
                      9: #ifndef TC_HEADER_Platform_SystemLog
                     10: #define TC_HEADER_Platform_SystemLog
                     11: 
                     12: #include "Platform/PlatformBase.h"
                     13: #include "Platform/StringConverter.h"
                     14: 
                     15: namespace TrueCrypt
                     16: {
                     17:        class SystemLog
                     18:        {
                     19:        public:
                     20:                static void WriteDebug (const string &debugMessage);
                     21:                static void WriteError (const string &errorMessage);
                     22:                
                     23:                static void WriteException (const exception &ex)
                     24:                {
                     25:                        WriteError (string ("exception: ") + StringConverter::ToSingle (StringConverter::ToExceptionString (ex)));
                     26:                }
                     27: 
                     28:        protected:
                     29:                SystemLog ();
                     30:        };
                     31: 
                     32: #ifdef DEBUG
                     33: #      define tracelog_point do { stringstream s; s << (SRC_POS); SystemLog::WriteError (s.str()); } while (false)
                     34: #      define tracelog_msg(stream_args) do { stringstream s; s << (SRC_POS) << ": " << stream_args; SystemLog::WriteError (s.str()); } while (false)
                     35: #else
                     36: #      define tracelog_point
                     37: #      define tracelog_msg(stream_args) while (false) { stringstream s; s << stream_args; }
                     38: #endif
                     39: 
                     40: }
                     41: 
                     42: #endif // TC_HEADER_Platform_SystemLog

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.