MCPcopy Create free account
hub / github.com/android/ndk-samples / SetDefaultTag

Function SetDefaultTag

base/src/main/cpp/logging.cpp:106–115  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

104static std::string* gDefaultTag;
105
106void SetDefaultTag(const std::string_view tag) {
107 std::lock_guard<std::recursive_mutex> lock(TagLock());
108 if (gDefaultTag != nullptr) {
109 delete gDefaultTag;
110 gDefaultTag = nullptr;
111 }
112 if (!tag.empty()) {
113 gDefaultTag = new std::string(tag);
114 }
115}
116
117static bool gInitialized = false;
118

Callers 1

InitLoggingFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected