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

Method Log

pdal/Log.cpp:44–66  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42{
43
44Log::Log(std::string const& leaderString, std::string const& outputName,
45 bool timing)
46 : m_level(LogLevel::Warning)
47 , m_deleteStreamOnCleanup(false)
48 , m_timing(timing)
49{
50 if (Utils::iequals(outputName, "stdlog"))
51 m_log = &std::clog;
52 else if (Utils::iequals(outputName, "stderr"))
53 m_log = &std::cerr;
54 else if (Utils::iequals(outputName, "stdout"))
55 m_log = &std::cout;
56 else if (Utils::iequals(outputName, "devnull"))
57 m_log = &m_nullStream;
58 else
59 {
60 m_log = Utils::createFile(outputName);
61 m_deleteStreamOnCleanup = true;
62 }
63 m_leaders.push(leaderString);
64 if (m_timing)
65 m_start = m_clock.now();
66}
67
68
69Log::Log(std::string const& leaderString, std::ostream* v, bool timing)

Callers

nothing calls this directly

Calls 4

iequalsFunction · 0.85
nowMethod · 0.80
createFileFunction · 0.70
pushMethod · 0.45

Tested by

no test coverage detected