lean cpp library
A lean C++ library providing efficient utility classes for high-performance C++ applications.
|
00001 /*****************************************************/ 00002 /* lean Logging (c) Tobias Zirr 2011 */ 00003 /*****************************************************/ 00004 00005 // Opaque value requires this to go here 00006 #ifdef LEAN_INCLUDE_LINKED 00007 #ifndef LEAN_LOGGING_LOG_FILE_CPP 00008 #define LEAN_LOGGING_LOG_FILE_CPP 00009 #include "source/log_file.cpp" 00010 #endif 00011 #endif 00012 00013 #ifndef LEAN_LOGGING_LOG_FILE 00014 #define LEAN_LOGGING_LOG_FILE 00015 00016 #include "../lean.h" 00017 #include "../strings/types.h" 00018 #include "../io/win_types.h" 00019 #include "log_target.h" 00020 00021 namespace lean 00022 { 00023 namespace logging 00024 { 00025 00027 class log_file : public log_target 00028 { 00029 private: 00030 windows_file_handle m_handle; 00031 00032 public: 00034 LEAN_MAYBE_EXPORT explicit log_file(const utf8_ntri &name); 00036 LEAN_MAYBE_EXPORT ~log_file(); 00037 00039 LEAN_MAYBE_EXPORT bool valid() const; 00040 00042 LEAN_MAYBE_EXPORT void print(const char_ntri &message); 00043 }; 00044 00045 } // namespace 00046 00047 using logging::log_file; 00048 00049 } // namespace 00050 00051 #endif