1 // Copyright 2014 Idol Software, Inc.
3 // This file is part of Doctor Dump SDK.
5 // Doctor Dump SDK is free software: you can redistribute it and/or modify
6 // it under the terms of the GNU Lesser General Public License as published by
7 // the Free Software Foundation, either version 3 of the License, or
8 // (at your option) any later version.
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU Lesser General Public License for more details.
15 // You should have received a copy of the GNU Lesser General Public License
16 // along with this program. If not, see <http://www.gnu.org/licenses/>.
25 class ConsoleMedia
: public ILogMedia
30 virtual void Write(ELogMessageType type
, ELogMessageLevel nLevel
, LPCTSTR pszDate
, LPCTSTR pszTime
, LPCTSTR pszThreadId
, LPCTSTR pszThreadName
, LPCTSTR pszModule
, LPCTSTR pszMessage
);
34 CONSOLE_SCREEN_BUFFER_INFO m_info
;
35 bool m_bRedirectedToFile
;
38 class FileMedia
: public ILogMedia
41 FileMedia(LPCTSTR pszFilename
, bool bAppend
, bool bFlush
, bool bNewFileDaily
= false);
43 virtual bool IsWorking() const;
45 virtual void Write(ELogMessageType type
, ELogMessageLevel nLevel
, LPCTSTR pszDate
, LPCTSTR pszTime
, LPCTSTR pszThreadId
, LPCTSTR pszThreadName
, LPCTSTR pszModule
, LPCTSTR pszMessage
);
49 bool m_bNewFileDaily
;//For this mode to work, file name template must contain %DATE%
50 WORD m_wLogYear
, m_wLogMonth
, m_wLogDay
;
53 CString m_sFilename
, m_sOrigFilename
;
58 class DebugMedia
: public ILogMedia
62 DebugMedia(DWORD dwParam
);
63 virtual bool IsWorking() const;
65 virtual void Write(ELogMessageType type
, ELogMessageLevel nLevel
, LPCTSTR pszDate
, LPCTSTR pszTime
, LPCTSTR pszThreadId
, LPCTSTR pszThreadName
, LPCTSTR pszModule
, LPCTSTR pszMessage
);