MCPcopy Create free account
hub / github.com/OpenShot/libopenshot / Path

Method Path

src/ZmqLogger.cpp:135–153  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

133}
134
135void ZmqLogger::Path(std::string new_path)
136{
137 // Update path
138 file_path = new_path;
139
140 // Close file (if already open)
141 if (log_file.is_open())
142 log_file.close();
143
144 // Open file (write + append)
145 log_file.open (file_path.c_str(), std::ios::out | std::ios::app);
146
147 // Get current time and log first message
148 std::time_t now = std::time(0);
149 std::tm* localtm = std::localtime(&now);
150 log_file << "------------------------------------------" << std::endl;
151 log_file << "libopenshot logging: " << std::asctime(localtm);
152 log_file << "------------------------------------------" << std::endl;
153}
154
155void ZmqLogger::Close()
156{

Callers 1

mainFunction · 0.80

Calls 1

openMethod · 0.80

Tested by

no test coverage detected