diff options
| author | Xanadu <none@none> | 2010-07-20 02:49:28 +0200 |
|---|---|---|
| committer | Xanadu <none@none> | 2010-07-20 02:49:28 +0200 |
| commit | 79622802f397258ee0f34327ba3ae6977ca3e7ff (patch) | |
| tree | 1868946c234ab9ee256a6b7766a15713eae94235 /dep/include/g3dlite/G3D/Log.h | |
| parent | 7dd2dc91816ab8b3bc3b99a1b1c99c7ea314d5a8 (diff) | |
| parent | f906976837502fa5aa81b982b901d1509f5aa0c4 (diff) | |
Merge. Revision history for source files should be all back now.
--HG--
branch : trunk
rename : sql/CMakeLists.txt => sql/tools/CMakeLists.txt
rename : src/server/game/Pools/PoolHandler.cpp => src/server/game/Pools/PoolMgr.cpp
rename : src/server/game/Pools/PoolHandler.h => src/server/game/Pools/PoolMgr.h
rename : src/server/game/PrecompiledHeaders/NixCorePCH.cpp => src/server/game/PrecompiledHeaders/gamePCH.cpp
rename : src/server/game/PrecompiledHeaders/NixCorePCH.h => src/server/game/PrecompiledHeaders/gamePCH.h
Diffstat (limited to 'dep/include/g3dlite/G3D/Log.h')
| -rw-r--r-- | dep/include/g3dlite/G3D/Log.h | 109 |
1 files changed, 0 insertions, 109 deletions
diff --git a/dep/include/g3dlite/G3D/Log.h b/dep/include/g3dlite/G3D/Log.h deleted file mode 100644 index d252d0c1a17..00000000000 --- a/dep/include/g3dlite/G3D/Log.h +++ /dev/null @@ -1,109 +0,0 @@ -/** - @file Log.h - - @maintainer Morgan McGuire, http://graphics.cs.williams.edu - @cite Backtrace by Aaron Orenstein - @created 2001-08-04 - @edited 2005-11-04 - */ - -#ifndef G3D_LOG_H -#define G3D_LOG_H - -#include <stdio.h> -#include <string> -#include "G3D/platform.h" - -#ifndef G3D_WIN32 - #include <stdarg.h> -#endif - -namespace G3D { - -/** Prints to the common system log, log.txt, which is usually - in the working directory of the program. If your disk is - not writable or is slow, it will attempt to write to "c:/tmp/log.txt" or - "c:/temp/log.txt" on Windows systems instead. - - Unlike printf or debugPrintf, - this function guarantees that all output is committed before it returns. - This is very useful for debugging a crash, which might hide the last few - buffered print statements otherwise. - - Many G3D routines write useful warnings and debugging information to the - system log, which makes it a good first place to go when tracking down - a problem. - */ -void logPrintf(const char* fmt, ...); - -/** Does not flush the buffer; follow up with a logPrintf to force the flush. */ -void logLazyPrintf(const char* fmt, ...); - -/** - System log for debugging purposes. The first log opened - is the "common log" and can be accessed with the static - method common(). If you access common() and a common log - does not yet exist, one is created for you. - */ -class Log { -private: - - /** - Log messages go here. - */ - FILE* logFile; - - std::string filename; - - static Log* commonLog; - - int stripFromStackBottom; - -public: - - /** - @param stripFromStackBottom Number of call stacks to strip from the - bottom of the stack when printing a trace. Useful for hiding - routines like "main" and "WinMain". If the specified file cannot - be opened for some reason, tries to open "c:/tmp/log.txt" or - "c:/temp/log.txt" instead. - */ - Log(const std::string& filename = "log.txt", - int stripFromStackBottom = 0); - - virtual ~Log(); - - /** - Returns the handle to the file log. - */ - FILE* getFile() const; - - /** - Marks the beginning of a logfile section. - */ - void section(const std::string& s); - - /** - Given arguments like printf, writes characters to the debug text overlay. - */ - // We want G3D_CHECK_PRINTF_ARGS here, but that conflicts with the - // overload. - void __cdecl printf(const char* fmt, ...) G3D_CHECK_PRINTF_METHOD_ARGS; - - void __cdecl vprintf(const char*, va_list argPtr) G3D_CHECK_VPRINTF_METHOD_ARGS; - /** Does not flush */ - void __cdecl lazyvprintf(const char*, va_list argPtr) G3D_CHECK_VPRINTF_METHOD_ARGS; - - static Log* common(); - - static std::string getCommonLogFilename(); - - void print(const std::string& s); - - - void println(const std::string& s); -}; - -} - -#endif |
