toast-logncrash-ios-unity-mac-sdk
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
LogNCrash Class Reference

Public Member Functions

public delegate void _ExceptionDelegate (string message)
 ExceptionDelegate는 Unity CSharp에서 발생한 Crash를 서버로 전송한 이후 호출되는 콜백 입니다. 네이티브 Crash의 경우 호출되지 않습니다. More...
 

Static Public Member Functions

static Result Initialize ()
 Initialize는 SDK 초기화 메소드 입니다. 성공 시 true, 실패 시 false를 반환합니다. 초기화에 필요한 정보는 Assets/Toast/LogNCrash/Setting/Resource/LogNCrashSettings의 AssetDatabase를 참조합니다. AssetDatabase는 메뉴 바 상단의 LogNCrash/Edit Settings를 통해 생성합니다. More...
 
static Result Initialize (string collectorURL, string appkey, string version, int port)
 Initialize는 SDK 초기화 메소드 입니다. 성공 시 true, 실패 시 false를 반환합니다. 초기화를 위하여 collector url, appkey, version, port 정보를 입력합니다. More...
 
static Result Initialize (string collectorURL, string appkey, string version, int port, bool enableSyncStart)
 Initialize는 SDK 초기화 메소드 입니다. SendThread를 Lock 상태로 시작할 수 있습니다. Lock 상태에서는 로그가 발생하면 서버로 저장하지 않고, 큐에 저장하며 대기합니다. StartSendThread 함수가 호출되거나 Native Crash가 발생한 경우 Lock 상태를 해제 합니다. More...
 
static Result Initialize (string collectorURL, string appkey, string version, int port, bool enablePlcrashreporterflag, bool enableSyncStart)
 iOS 전용 Initialize는 SDK 초기화 메소드 입니다. 초기화 단계에서 PLCrashreoter의 활성화 여부를 결정 합니다. More...
 
static void AddCustomField (string key, string val)
 AddCustomField는 사용자 지정 필드를 추가합니다. key는 필드명, val은 필드값이 됩니다. 이때 필드명의 첫 단어는 a~z 혹은 A~Z로 시작하는 알파벳이어야 하며, 필드명은 공백을 포함할 수 없습니다. More...
 
static void RemoveCustomField (string key)
 RemoveCustomField는 사용자가 추가한 특정 필드를 삭제합니다. More...
 
static void RemoveAllCustomFields ()
 RemoveAllCustomFields는 사용자가 추가한 전체 필드를 삭제합니다. More...
 
static void SetUserId (string userID)
 SetUserId는 UserID 필드를 정의합니다. UserID는 현재 로그를 발생시킨 사용자를 구별하기 위한 필드로, 사용자별 에러 통계를 얻기 위해서는 반드시 정의해야 합니다. More...
 
static void SetLogType (string logType)
 SetLogType는 현재 로그의 타입을 정의합니다. 일반적으로 일반 로그, 크래시 로그 등 로그의 종류를 구별하기 위해 사용합니다. More...
 
static void SetLogSource (string logSource)
 SetLogSource는 현재 로그의 소스를 정의합니다. 일반적으로 aos-dev, aos-real, ios-real등 로그의 발생 위치를 구별하기 위해 사용합니다. More...
 
static string GetUserId ()
 GetUserId는 현재 UserID를 반환합니다. More...
 
static string GetLogType ()
 GetLogType는 현재 logType을 반환합니다. More...
 
static string GetLogSource ()
 GetLogSource는 현재 logSource를 반환합니다. More...
 
static void Info (string strMsg)
 Info(string strMsg) 함수는 logLevel이 INFO인 일반 로그로, 사용자가 입력한 문자열을 서버로 전송합니다. 일반적으로 현재 클라이언트의 정보를 서버에 기록하는 경우 전송합니다. More...
 
static void Debug (string strMsg)
 Debug(string strMsg) 함수는 logLevel이 DEBUG인 일반 로그로, 사용자가 입력한 문자열을 서버로 전송합니다. 일반적으로 현재 클라이언트의 디버깅 정보를 서버에 기록하는 경우 전송합니다. More...
 
static void Warn (string strMsg)
 Warn(string strMsg) 함수는 logLevel이 WARN인 일반 로그로, 사용자가 입력한 문자열을 서버로 전송합니다. 일반적으로 현재 클라이언트에서 발생한 경고 메세지를 서버에 기록하는 경우 전송합니다. More...
 
static void Error (string strMsg)
 Error(string strMsg) 함수는 logLevel이 ERROR인 일반 로그로, 사용자가 입력한 문자열을 서버로 전송합니다. 일반적으로 현재 클라이언트에서 발생한 에러 정보를 서버에 기록하는 경우 전송합니다. More...
 
static void Fatal (string strMsg)
 Fatal(string strMsg) 함수는 logLevel이 FATAL인 일반 로그로, 사용자가 입력한 문자열을 서버로 전송합니다. 일반적으로 현재 클라이언트에서 발생한 심각한 에러 정보를 서버에 기록하는 경우 전송합니다. More...
 
static void Info (string strMsg, Exception e)
 Info(string strMsg, Exception e) 함수는 logLevel이 INFO인 핸들드 로그로, 일반적으로 try&catch와 함께 사용되며 사용자가 직접 핸들링한 일반적인 수준의 에러 내용을 서버에 기록하는 경우 사용합니다. More...
 
static void Debug (string strMsg, Exception e)
 Debug(string strMsg, Exception e) 함수는 logLevel이 DEBUG인 핸들드 로그로, 일반적으로 try&catch와 함께 사용되며 사용자가 직접 핸들링한 테스트 수준의 에러 내용을 서버에 기록하는 경우 사용합니다. More...
 
static void Warn (string strMsg, Exception e)
 Warn(string strMsg, Exception e) 함수는 logLevel이 WARN인 핸들드 로그로, 일반적으로 try&catch와 함께 사용되며 사용자가 직접 핸들링한 문제가 될 수 있는 수준의 에러 내용을 서버에 기록하는 경우 사용합니다. More...
 
static void Error (string strMsg, Exception e)
 Error(string strMsg, Exception e) 함수는 logLevel이 ERROR인 핸들드 로그로, 일반적으로 try&catch와 함께 사용되며 사용자가 직접 핸들링한 사용자가 의도하지 않은 문제가 발생한 수준의 에러 내용을 서버에 기록하는 경우 사용합니다. More...
 
static void Fatal (string strMsg, Exception e)
 Fatal(string strMsg, Exception e) 함수는 logLevel이 FATAL인 핸들드 로그로, 일반적으로 try&catch와 함께 사용되며 어플리케이션 구동에 심각한 문제를 줄 수 있는 수준의 에러 내용을 서버에 기록하는 경우 사용합니다. More...
 
static void SetDeduplicate (bool flag)
 SetDeduplicate는 중복 로그 제거 설정 함수입니다. 중복 로그 제거 기능이란 일반 로그와 핸들드 로그의 경우 strMsg, logType, logLevel 필드을 기준으로 완전히 같은 로그들이 발생하는 경우, 이를 서버로 전송하지 않는 기능입니다. 크래시 로그의 경우 크래시 내용인 DmpData 필드를 기준으로 중복을 제거합니다. 기본값은 true이며, true인 경우 중복제거 기능이 활성화되며, false인 경우 비활성화됩니다. More...
 
static void SetDebugWarning (bool flag)
 UnityEngine에서 발생한 DEBUG WARN 레벨의 로그를 전송/무시 합니다. More...
 
static void SetDebugError (bool flag)
 UnityEngine에서 발생한 DEBUG ERROR 레벨의 로그를 전송/무시 합니다. More...
 
static void SetWarning (bool flag)
 UnityEngine에서 발생한 WARN 레벨의 로그를 전송/무시 합니다. More...
 
static void SetERROR (bool flag)
 UnityEngine에서 발생한 ERROR 레벨의 로그를 전송/무시 합니다. More...
 

Public Attributes

void SetEnableHost:(bool)flag
 true인 경우 ip address를 구하여 host 필드에 저장합니다. false인 경우 host 필드에 "-" 저장합니다. More...
 

Static Public Attributes

static public _ExceptionDelegate ExceptionDelegate
 

Member Function Documentation

§ _ExceptionDelegate()

public delegate void LogNCrash::_ExceptionDelegate ( string  message)

ExceptionDelegate는 Unity CSharp에서 발생한 Crash를 서버로 전송한 이후 호출되는 콜백 입니다. 네이티브 Crash의 경우 호출되지 않습니다.

Returns
void
Parameters
stringmessage Crash 발생 알림 메세지
public Sample : MonoBehaviour {
void Crash_Send_Complete_Callback(string message) {
Debug.Log("Crash_Send_Complete_Callback : " + message);
}
void Start() {
LogNCrashCallBack.ExceptionDelegate += Crash_Send_Complete_Callback;
}
}

§ AddCustomField()

static void LogNCrash::AddCustomField ( string  key,
string  val 
)
inlinestatic

AddCustomField는 사용자 지정 필드를 추가합니다. key는 필드명, val은 필드값이 됩니다. 이때 필드명의 첫 단어는 a~z 혹은 A~Z로 시작하는 알파벳이어야 하며, 필드명은 공백을 포함할 수 없습니다.

Returns
void
Parameters
stringkey 커스텀 필드 키
stringval 커스텀 필드 값
public Sample : MonoBehaviour {
void Awake() {
LogNCrash.AddCustomField("MyKey","MyValue");
}
}

§ Debug() [1/2]

static void LogNCrash::Debug ( string  strMsg)
inlinestatic

Debug(string strMsg) 함수는 logLevel이 DEBUG인 일반 로그로, 사용자가 입력한 문자열을 서버로 전송합니다. 일반적으로 현재 클라이언트의 디버깅 정보를 서버에 기록하는 경우 전송합니다.

Returns
void
Parameters
stringstrMsg 전달 메세지
public Sample : MonoBehaviour {
void Awake() {
LogNCrash.Debug("DEBUG MESSAGE");
}
}

§ Debug() [2/2]

static void LogNCrash::Debug ( string  strMsg,
Exception  e 
)
inlinestatic

Debug(string strMsg, Exception e) 함수는 logLevel이 DEBUG인 핸들드 로그로, 일반적으로 try&catch와 함께 사용되며 사용자가 직접 핸들링한 테스트 수준의 에러 내용을 서버에 기록하는 경우 사용합니다.

Returns
void
Parameters
stringstrMsg 전달 메세지
Exceptione 에러 내용
public Sample : MonoBehaviour {
void Awake() {
try{
int [] a = new int[1];
int b = a[1];
}
catch(Exception e){
LogNCrash.Debug ("HANLED DEBUG MESSAGE", e);
}
}
}

§ Error() [1/2]

static void LogNCrash::Error ( string  strMsg)
inlinestatic

Error(string strMsg) 함수는 logLevel이 ERROR인 일반 로그로, 사용자가 입력한 문자열을 서버로 전송합니다. 일반적으로 현재 클라이언트에서 발생한 에러 정보를 서버에 기록하는 경우 전송합니다.

Returns
void
Parameters
stringstrMsg 전달 메세지
public Sample : MonoBehaviour {
void Awake() {
LogNCrash.Error("ERROR MESSAGE");
}
}

§ Error() [2/2]

static void LogNCrash::Error ( string  strMsg,
Exception  e 
)
inlinestatic

Error(string strMsg, Exception e) 함수는 logLevel이 ERROR인 핸들드 로그로, 일반적으로 try&catch와 함께 사용되며 사용자가 직접 핸들링한 사용자가 의도하지 않은 문제가 발생한 수준의 에러 내용을 서버에 기록하는 경우 사용합니다.

Returns
void
Parameters
stringstrMsg 전달 메세지
Exceptione 에러 내용
public Sample : MonoBehaviour {
void Awake() {
try{
int [] a = new int[1];
int b = a[1];
}
catch(Exception e){
LogNCrash.Error ("HANLED ERROR MESSAGE", e);
}
}
}

§ Fatal() [1/2]

static void LogNCrash::Fatal ( string  strMsg)
inlinestatic

Fatal(string strMsg) 함수는 logLevel이 FATAL인 일반 로그로, 사용자가 입력한 문자열을 서버로 전송합니다. 일반적으로 현재 클라이언트에서 발생한 심각한 에러 정보를 서버에 기록하는 경우 전송합니다.

Returns
void
Parameters
stringstrMsg 전달 메세지
public Sample : MonoBehaviour {
void Awake() {
LogNCrash.Fatal("FATAL MESSAGE");
}
}

§ Fatal() [2/2]

static void LogNCrash::Fatal ( string  strMsg,
Exception  e 
)
inlinestatic

Fatal(string strMsg, Exception e) 함수는 logLevel이 FATAL인 핸들드 로그로, 일반적으로 try&catch와 함께 사용되며 어플리케이션 구동에 심각한 문제를 줄 수 있는 수준의 에러 내용을 서버에 기록하는 경우 사용합니다.

Returns
void
Parameters
stringstrMsg 전달 메세지
Exceptione 에러 내용
public Sample : MonoBehaviour {
void Awake() {
try{
int [] a = new int[1];
int b = a[1];
}
catch(Exception e){
LogNCrash.Info ("HANLED FATAL MESSAGE", e);
}
}
}

§ GetLogSource()

static string LogNCrash::GetLogSource ( )
inlinestatic

GetLogSource는 현재 logSource를 반환합니다.

Returns
void
public Sample : MonoBehaviour {
void Awake() {
string logSource = LogNCrash.GetLogSource();
}
}

§ GetLogType()

static string LogNCrash::GetLogType ( )
inlinestatic

GetLogType는 현재 logType을 반환합니다.

Returns
void
public Sample : MonoBehaviour {
void Awake() {
string logType = LogNCrash.GetLogType();
}
}

§ GetUserId()

static string LogNCrash::GetUserId ( )
inlinestatic

GetUserId는 현재 UserID를 반환합니다.

Returns
void
public Sample : MonoBehaviour {
void Awake() {
string UserId = LogNCrash.GetUserId();
}
}

§ Info() [1/2]

static void LogNCrash::Info ( string  strMsg)
inlinestatic

Info(string strMsg) 함수는 logLevel이 INFO인 일반 로그로, 사용자가 입력한 문자열을 서버로 전송합니다. 일반적으로 현재 클라이언트의 정보를 서버에 기록하는 경우 전송합니다.

Returns
void
Parameters
stringstrMsg 전달 메세지
public Sample : MonoBehaviour {
void Awake() {
LogNCrash.Info("INFO MESSAGE");
}
}

§ Info() [2/2]

static void LogNCrash::Info ( string  strMsg,
Exception  e 
)
inlinestatic

Info(string strMsg, Exception e) 함수는 logLevel이 INFO인 핸들드 로그로, 일반적으로 try&catch와 함께 사용되며 사용자가 직접 핸들링한 일반적인 수준의 에러 내용을 서버에 기록하는 경우 사용합니다.

Returns
void
Parameters
stringstrMsg 전달 메세지
Exceptione 에러 내용
public Sample : MonoBehaviour {
void Awake() {
try{
int [] a = new int[1];
int b = a[1];
}
catch(Exception e){
LogNCrash.Info ("HANLED INFO MESSAGE", e);
}
}
}

§ Initialize() [1/4]

static Result LogNCrash::Initialize ( )
inlinestatic

Initialize는 SDK 초기화 메소드 입니다. 성공 시 true, 실패 시 false를 반환합니다. 초기화에 필요한 정보는 Assets/Toast/LogNCrash/Setting/Resource/LogNCrashSettings의 AssetDatabase를 참조합니다. AssetDatabase는 메뉴 바 상단의 LogNCrash/Edit Settings를 통해 생성합니다.

Returns
Result : 성공 / 실패
public Sample : MonoBehaviour {
void Awake() {
}
}

§ Initialize() [2/4]

static Result LogNCrash::Initialize ( string  collectorURL,
string  appkey,
string  version,
int  port 
)
inlinestatic

Initialize는 SDK 초기화 메소드 입니다. 성공 시 true, 실패 시 false를 반환합니다. 초기화를 위하여 collector url, appkey, version, port 정보를 입력합니다.

Returns
Result : 성공 / 실패
public Sample : MonoBehaviour {
void Awake() {
LogNCrash.Initialize("http://api-logncrash.cloud.toast.com","__app_key__","1.0.0",80);
}
}

§ Initialize() [3/4]

static Result LogNCrash::Initialize ( string  collectorURL,
string  appkey,
string  version,
int  port,
bool  enableSyncStart 
)
inlinestatic

Initialize는 SDK 초기화 메소드 입니다. SendThread를 Lock 상태로 시작할 수 있습니다. Lock 상태에서는 로그가 발생하면 서버로 저장하지 않고, 큐에 저장하며 대기합니다. StartSendThread 함수가 호출되거나 Native Crash가 발생한 경우 Lock 상태를 해제 합니다.

Returns
Result : 성공 / 실패
public Sample : MonoBehaviour {
void Awake() {
LogNCrash.Initialize("http://api-logncrash.cloud.toast.com","__app_key__","1.0.0",80);
}
}

§ Initialize() [4/4]

static Result LogNCrash::Initialize ( string  collectorURL,
string  appkey,
string  version,
int  port,
bool  enablePlcrashreporterflag,
bool  enableSyncStart 
)
inlinestatic

iOS 전용 Initialize는 SDK 초기화 메소드 입니다. 초기화 단계에서 PLCrashreoter의 활성화 여부를 결정 합니다.

Returns
Result : 성공 / 실패
public Sample : MonoBehaviour {
void Awake() {
LogNCrash.Initialize("http://api-logncrash.cloud.toast.com","__app_key__","1.0.0",80, true, true);
}
}

§ RemoveAllCustomFields()

static void LogNCrash::RemoveAllCustomFields ( )
inlinestatic

RemoveAllCustomFields는 사용자가 추가한 전체 필드를 삭제합니다.

Returns
void
public Sample : MonoBehaviour {
void Awake() {
}
}

§ RemoveCustomField()

static void LogNCrash::RemoveCustomField ( string  key)
inlinestatic

RemoveCustomField는 사용자가 추가한 특정 필드를 삭제합니다.

Returns
void
Parameters
stringkey 커스텀 필드 키
public Sample : MonoBehaviour {
void Awake() {
LogNCrash.AddCustomField("MyKey","MyValue");
}
}

§ SetDebugError()

static void LogNCrash::SetDebugError ( bool  flag)
inlinestatic

UnityEngine에서 발생한 DEBUG ERROR 레벨의 로그를 전송/무시 합니다.

Returns
void
public Sample : MonoBehaviour {
void Awake() {
}
}

§ SetDebugWarning()

static void LogNCrash::SetDebugWarning ( bool  flag)
inlinestatic

UnityEngine에서 발생한 DEBUG WARN 레벨의 로그를 전송/무시 합니다.

Returns
void
public Sample : MonoBehaviour {
void Awake() {
}
}

§ SetDeduplicate()

static void LogNCrash::SetDeduplicate ( bool  flag)
inlinestatic

SetDeduplicate는 중복 로그 제거 설정 함수입니다. 중복 로그 제거 기능이란 일반 로그와 핸들드 로그의 경우 strMsg, logType, logLevel 필드을 기준으로 완전히 같은 로그들이 발생하는 경우, 이를 서버로 전송하지 않는 기능입니다. 크래시 로그의 경우 크래시 내용인 DmpData 필드를 기준으로 중복을 제거합니다. 기본값은 true이며, true인 경우 중복제거 기능이 활성화되며, false인 경우 비활성화됩니다.

Returns
void
Parameters
boolflag 중복 제거 활성화 / 비활성화
public Sample : MonoBehaviour {
void Awake() {
LogNCrash.SetDeduplicate(false); // 중복제거 비활성화
}
}

§ SetERROR()

static void LogNCrash::SetERROR ( bool  flag)
inlinestatic

UnityEngine에서 발생한 ERROR 레벨의 로그를 전송/무시 합니다.

Returns
void
public Sample : MonoBehaviour {
void Awake() {
}
}

§ SetLogSource()

static void LogNCrash::SetLogSource ( string  logSource)
inlinestatic

SetLogSource는 현재 로그의 소스를 정의합니다. 일반적으로 aos-dev, aos-real, ios-real등 로그의 발생 위치를 구별하기 위해 사용합니다.

Returns
void
Parameters
logSource로그 소스
public Sample : MonoBehaviour {
void Awake() {
LogNCrash.SetLogSource("logSource");
}
}

§ SetLogType()

static void LogNCrash::SetLogType ( string  logType)
inlinestatic

SetLogType는 현재 로그의 타입을 정의합니다. 일반적으로 일반 로그, 크래시 로그 등 로그의 종류를 구별하기 위해 사용합니다.

Returns
void
Parameters
stringlogType 로그 타입
public Sample : MonoBehaviour {
void Awake() {
LogNCrash.SetLogType("logType");
}
}

§ SetUserId()

static void LogNCrash::SetUserId ( string  userID)
inlinestatic

SetUserId는 UserID 필드를 정의합니다. UserID는 현재 로그를 발생시킨 사용자를 구별하기 위한 필드로, 사용자별 에러 통계를 얻기 위해서는 반드시 정의해야 합니다.

Returns
void
Parameters
userID사용자 아이디
public Sample : MonoBehaviour {
void Awake() {
LogNCrash.SetUserId("userid");
}
}

§ SetWarning()

static void LogNCrash::SetWarning ( bool  flag)
inlinestatic

UnityEngine에서 발생한 WARN 레벨의 로그를 전송/무시 합니다.

Returns
void
public Sample : MonoBehaviour {
void Awake() {
}
}

§ Warn() [1/2]

static void LogNCrash::Warn ( string  strMsg)
inlinestatic

Warn(string strMsg) 함수는 logLevel이 WARN인 일반 로그로, 사용자가 입력한 문자열을 서버로 전송합니다. 일반적으로 현재 클라이언트에서 발생한 경고 메세지를 서버에 기록하는 경우 전송합니다.

Returns
void
Parameters
stringstrMsg 전달 메세지
public Sample : MonoBehaviour {
void Awake() {
LogNCrash.Warn("WARN MESSAGE");
}
}

§ Warn() [2/2]

static void LogNCrash::Warn ( string  strMsg,
Exception  e 
)
inlinestatic

Warn(string strMsg, Exception e) 함수는 logLevel이 WARN인 핸들드 로그로, 일반적으로 try&catch와 함께 사용되며 사용자가 직접 핸들링한 문제가 될 수 있는 수준의 에러 내용을 서버에 기록하는 경우 사용합니다.

Returns
void
Parameters
stringstrMsg 전달 메세지
Exceptione 에러 내용
public Sample : MonoBehaviour {
void Awake() {
try{
int [] a = new int[1];
int b = a[1];
}
catch(Exception e){
LogNCrash.Warn ("HANLED WARN MESSAGE", e);
}
}
}

Member Data Documentation

§ SetEnableHost

void LogNCrash::SetEnableHost

true인 경우 ip address를 구하여 host 필드에 저장합니다. false인 경우 host 필드에 "-" 저장합니다.

Returns
void
public Sample : MonoBehaviour {
void Awake() {
}
}

The documentation for this class was generated from the following file: