base
This commit is contained in:
@@ -0,0 +1,62 @@
|
||||
/****************************************************************************
|
||||
Report 로그 처리용 Class
|
||||
-----------------------------------------
|
||||
|
||||
begin : 2013/11/25
|
||||
copyright : (C) 2005 Solbox Inc.
|
||||
author : Dev 1 Team
|
||||
email : dev1@solbox.com
|
||||
version : 3.2.0
|
||||
|
||||
CopyRight(C) 2005 Solbox Inc. All Rights reserved.
|
||||
Redistribution and use in source and binary forms, with or with out
|
||||
modification, are not permitted in outside of Solbox Inc.
|
||||
*****************************************************************************/
|
||||
|
||||
#ifndef __REPORT_LOG_H__
|
||||
#define __REPORT_LOG_H__
|
||||
|
||||
|
||||
#include <unistd.h>
|
||||
#include <string>
|
||||
|
||||
|
||||
/// @brief CReportLog
|
||||
/// 본 클래스는 전달받은 경로 하위 report 폴더 상에...
|
||||
/// 운영자들에게 전달할 report 관련 log 를 기록하기 위한 클래스임.
|
||||
/// lib 에 존재하는 CLogger Class 가 프로세스에 대해 singleton 방식으로 동작하므로... 해당 Class 를 사용하기는 어려움.
|
||||
/// 따라서 report 관련 로그만 전담하여 처리하기 위한 로그 Class 를 추가함.
|
||||
class CReportLog
|
||||
{
|
||||
public:
|
||||
|
||||
// constructor
|
||||
CReportLog();
|
||||
|
||||
// destructor
|
||||
~CReportLog();
|
||||
|
||||
// 초기화..
|
||||
bool Init( const char * szPath );
|
||||
|
||||
// log wirte
|
||||
bool Write( const char * szLevel, const char * fmt, ...)
|
||||
__attribute__((format(printf, 3, 4)));
|
||||
|
||||
// Get last error log
|
||||
void GetLastError( std::string & errorMessage ) { errorMessage = m_strLastError; return; }
|
||||
|
||||
|
||||
private:
|
||||
|
||||
// Log Full Path
|
||||
std::string m_strFullPath;
|
||||
|
||||
// last Error String
|
||||
std::string m_strLastError;
|
||||
|
||||
|
||||
};
|
||||
|
||||
#endif /* __REPORT_LOG_H__ */
|
||||
|
||||
Reference in New Issue
Block a user