void rhoRubyLogWithSeverity(int severity, VALUE category, VALUE str) { char* szStr = 0; char* catStr = StringValuePtr(category); if(catStr == NULL) { catStr = "APP"; } str = rb_obj_as_string(str); szStr = RSTRING_PTR(str); //Skip just newline string if ( strcmp(szStr,"\r\n") != 0 && strcmp(szStr,"\n") != 0 ) rhoPlainLog("",0,severity,catStr,RSTRING_PTR(str)); }
static VALUE rb_RhoLogWrite(VALUE rhoLog, VALUE str) { #if RHO_STRIP_LOG <= L_INFO char* szStr = 0; str = rb_obj_as_string(str); szStr = RSTRING_PTR(str); //Skip just newline string if ( strcmp(szStr,"\r\n") != 0 && strcmp(szStr,"\n") != 0 ) rhoPlainLog("",0,L_INFO,"APP",RSTRING_PTR(str)); #else #endif return Qnil; }
void CExtManager::rhoLog(ELogExtLevels eLogLevel, const char* szModule, const char* szMsg, const char* szFile, int nLine) { int nSeverity = L_INFO; switch (eLogLevel) { case eLogError: nSeverity = L_ERROR; break; case eLogWarning: nSeverity = L_WARNING; break; case eLogInfo: nSeverity = L_INFO; break; case eLogUser: nSeverity = L_INFO; break; case eLogDebug: nSeverity = L_TRACE; break; } rhoPlainLog(szFile, nLine, nSeverity, szModule, szMsg); }
void CExtManager::rhoLog(ELogExtLevels eLogLevel, const char* szModule, const char* szMsg, const char* szFile, int nLine) { #if defined(APP_BUILD_CAPABILITY_SHARED_RUNTIME) bool bRE1App = false; if (!rho_wmimpl_get_is_version2()) bRE1App = true; if (bRE1App && !rho_wmimpl_is_loglevel_enabled(eLogLevel)) return; #endif int nSeverity = L_INFO; switch (eLogLevel) { case eLogError: nSeverity = L_ERROR; break; case eLogWarning: nSeverity = L_WARNING; break; case eLogInfo: nSeverity = L_INFO; break; case eLogUser: nSeverity = L_INFO; break; case eLogDebug: nSeverity = L_TRACE; break; } rhoPlainLog(szFile, nLine, nSeverity, szModule, szMsg); }
void rhoRubyFatalError(const char* szError) { rhoPlainLog("",0,L_FATAL,"RubyVM",szError); }
void CExtManager::rhoLog(int nSeverity, const char* szModule, const char* szMsg, const char* szFile, int nLine) { rhoPlainLog(szFile, nLine, nSeverity, szModule, szMsg); }