MCPcopy Create free account
hub / github.com/ddnet/ddnet / Log

Method Log

src/base/log.cpp:149–168  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

147{
148public:
149 void Log(const CLogMessage *pMessage) override
150 {
151 if(m_Filter.Filters(pMessage))
152 {
153 return;
154 }
155 int AndroidLevel;
156 switch(pMessage->m_Level)
157 {
158 case LEVEL_TRACE: AndroidLevel = ANDROID_LOG_VERBOSE; break;
159 case LEVEL_DEBUG: AndroidLevel = ANDROID_LOG_DEBUG; break;
160 case LEVEL_INFO: AndroidLevel = ANDROID_LOG_INFO; break;
161 case LEVEL_WARN: AndroidLevel = ANDROID_LOG_WARN; break;
162 case LEVEL_ERROR: AndroidLevel = ANDROID_LOG_ERROR; break;
163 }
164 char aTag[64];
165 str_copy(aTag, ANDROID_PACKAGE_NAME "/");
166 str_append(aTag, pMessage->m_aSystem);
167 __android_log_write(AndroidLevel, aTag, pMessage->Message());
168 }
169};
170std::unique_ptr<ILogger> log_logger_android()
171{

Callers

nothing calls this directly

Calls 4

FiltersMethod · 0.80
MessageMethod · 0.80
str_copyFunction · 0.70
str_appendFunction · 0.70

Tested by

no test coverage detected