MCPcopy Create free account
hub / github.com/PurpleI2P/i2pd / SendTo

Method SendTo

libi2pd/Log.cpp:214–228  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

212 }
213
214 void Log::SendTo (const std::string& path)
215 {
216 if (m_LogStream) m_LogStream = nullptr; // close previous
217 auto flags = std::ofstream::out | std::ofstream::app;
218 auto os = std::make_shared<std::ofstream> (path, flags);
219 if (os->is_open ())
220 {
221 m_HasColors = false;
222 m_Logfile = path;
223 m_Destination = eLogFile;
224 m_LogStream = os;
225 return;
226 }
227 LogPrint(eLogCritical, "Log: Can't open file ", path);
228 }
229
230 void Log::SendTo (std::shared_ptr<std::ostream> os) {
231 m_HasColors = false;

Callers 2

initMethod · 0.45
StartI2PFunction · 0.45

Calls 1

LogPrintFunction · 0.85

Tested by

no test coverage detected