14 #pragma managed( push, off ) 27 #define LogOutDebug LibLogOut::CLibLogOut::EOutputDevice::Debug 28 #define LogOutConsole LibLogOut::CLibLogOut::EOutputDevice::Console
29 #define LogOutFile LibLogOut::CLibLogOut::EOutputDevice::File
30 #define LogOutDeviceMax LibLogOut::CLibLogOut::DEVICE_MAX
31 #define LogOutInstance() LibLogOut::CLibLogOut::GetInstance()
32 #define LogOutChar(...) LogOutInstance().OutputChar(__VA_ARGS__)
33 #define LogOutString(...) LogOutInstance().OutputString(__VA_ARGS__)
34 #define LogOutFormat(...) LogOutInstance().OutputFormat(__VA_ARGS__)
35 #define LogOutNewLine() LogOutInstance().OutputNewLine()
36 #define LogOutLineString(...) LogOutInstance().OutputLineString(__VA_ARGS__)
37 #define LogOutLineFormat(...) LogOutInstance().OutputLineFormat(__VA_ARGS__)
38 #define LogOutExLineFormat(...) LogOutInstance().ExOutputLineFormat(__VA_ARGS__)
39 #define LogOutNoIndent(...) LogOutInstance().ExOutputLineFormat(true,false,__VA_ARGS__)
40 #define LogOutLine(...) LogOutInstance().ExOutputLineFormat(false,false,__VA_ARGS__)
41 #define LogOutExeFile() LogOutInstance().GetExeFile()
42 #define LogOutFunction() LogOutLineFormat(L"%s!%s()",LogOutExeFile(),__FUNCTIONW__)
43 #define LogOutIndent() LogOutInstance().Indent()
44 #define LogOutUnindent() LogOutInstance().Unindent()
45 #define LogOutBlockIn(...) LogOutLineFormat(__VA_ARGS__);LogOutIndent()
46 #define LogOutBlockOut(...) LogOutUnindent();LogOutLineFormat(__VA_ARGS__)
47 #define LogOutHeader() LogOutBlockIn (L"%s!%s() {", LogOutExeFile(),__FUNCTIONW__)
48 #define LogOutRefferCount() LogOutInstance().GetRefferCount()
49 #define LogOutBufferCount() LogOutInstance().GetCount()
50 #define LogOutFooter() LogOutBlockOut(L"} // %s!%s()",LogOutExeFile(),__FUNCTIONW__)
51 #define LogOutFlush() LogOutInstance().Flush()
52 #define LogOutDevice(...) LogOutInstance().SetDeviceProcess(__VA_ARGS__)
85 static int const DEVICE_MAX =
static_cast< int >( EOutputDevice::Size );
124 inline virtual
wchar_t const* GetExeFile() noexcept {
return m_szExeFile; }
140 virtual bool OutputString(
wchar_t const* pszString ) noexcept
override;
153 virtual bool UpdateLineNumber() noexcept
override;
164 virtual int GetLineNumber() noexcept
override;
175 virtual int GetIndentCount() noexcept
override;
188 virtual bool Indent() noexcept
override;
201 virtual bool Unindent() noexcept
override;
212 virtual int GetRefferCount() noexcept;
223 virtual int GetCount() noexcept;
236 virtual bool Flush() noexcept;
250 virtual bool SetDeviceProcess(
EOutputDevice eDevice, DWORD dwProcessId ) noexcept;
266 virtual bool UpdateProcessInfo(
bool bCurrent =
false ) noexcept;
279 virtual bool OutputDevice() noexcept;
307 static wchar_t const* GetProjectType() noexcept;
318 static HINSTANCE GetInstanceHandle() noexcept;
332 static DWORD WINAPI SubThreadProc( LPVOID lpParam ) noexcept;
346 static bool GetNewLogFilePath(
wchar_t* pszPath,
int nSize ) noexcept;
351 static int const BUFFER_SIZE = ( 1024 * 1024 - 1 );
352 static int const PROCESS_MAX = 256;
353 static DWORD
const NOTIFY_WAIT = 3000;
379 wchar_t m_szBuffer[ BUFFER_SIZE + 1 ];
383 wchar_t m_szPath[ MAX_PATH ];
384 bool m_bEnable[ DEVICE_MAX ];
385 DWORD m_dwProcessId[ DEVICE_MAX ];
400 wchar_t m_szExeFile[ MAX_PATH ];
422 #pragma managed( pop ) CThread m_cThreadSub
サブスレッド
static wchar_t const *const EVENT_NOTIFY_NAME
通知イベント名
int m_nRequestPos
出力要求開始位置
CEvent m_cEventRequest
要求イベント
static CLibLogOut s_cInstance
静的インスタンス
SMappingInfo * m_psMappingInfo
共有メモリ情報構造体ポインタ
EOutputDevice m_eDevice
出力要求デバイス種別
static wchar_t const *const OBJECT_NAME
オブジェクト名
static wchar_t const *const EVENT_REQUEST_FORMAT
要求イベント名書式設定文字列
#define LIB_LOGOUT_API
ダイナミックライブラリインポート宣言
int m_nRequestSize
出力要求サイズ
static CLibLogOut & GetInstance() noexcept
インスタンス取得関数
CFileStream m_cFileLog
ログ出力ファイル
CEvent m_cEventNotify
通知イベント
DWORD m_dwProcessId
プロセスID