MCPcopy Create free account
hub / github.com/arrayfire/arrayfire / loggerFactory

Function loggerFactory

src/backend/common/Logger.cpp:35–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33namespace common {
34
35shared_ptr<logger> loggerFactory(const string& name) {
36 shared_ptr<logger> logger;
37 if (!(logger = get(name))) {
38 logger = stdout_logger_mt(name);
39 logger->set_pattern("[%n][%E][%t] %v");
40
41 // Log mode
42 string env_var = getEnvVar("AF_TRACE");
43 if (env_var.find("all") != string::npos ||
44 env_var.find(name) != string::npos) {
45 logger->set_level(spdlog::level::trace);
46 } else {
47 logger->set_level(spdlog::level::off);
48 }
49 }
50 return logger;
51}
52
53string bytesToString(size_t bytes) {
54 constexpr array<const char*, 7> units{

Callers 15

AllocatorMethod · 0.85
AllocatorPinnedMethod · 0.85
passesJitHeuristicsFunction · 0.85
DeviceManagerMethod · 0.85
getLoggerFunction · 0.85
getLoggerFunction · 0.85
AllocatorMethod · 0.85
AllocatorPinnedMethod · 0.85
passesJitHeuristicsFunction · 0.85
DeviceManagerMethod · 0.85
getLoggerFunction · 0.85
getLoggerFunction · 0.85

Calls 3

getEnvVarFunction · 0.85
findMethod · 0.80
getFunction · 0.50

Tested by

no test coverage detected