comparison Core/Logging.cpp @ 2140:aa4b8895cd23

reorganization
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 09 Nov 2016 16:12:47 +0100
parents ddc75c6c712d
children fd5875662670
comparison
equal deleted inserted replaced
2139:764c9157301b 2140:aa4b8895cd23
148 In this implementation : "hostname" and "username" are not used 148 In this implementation : "hostname" and "username" are not used
149 **/ 149 **/
150 150
151 boost::posix_time::ptime now = boost::posix_time::second_clock::local_time(); 151 boost::posix_time::ptime now = boost::posix_time::second_clock::local_time();
152 boost::filesystem::path root(directory); 152 boost::filesystem::path root(directory);
153 boost::filesystem::path exe(Toolbox::GetPathToExecutable()); 153 boost::filesystem::path exe(SystemToolbox::GetPathToExecutable());
154 154
155 if (!boost::filesystem::exists(root) || 155 if (!boost::filesystem::exists(root) ||
156 !boost::filesystem::is_directory(root)) 156 !boost::filesystem::is_directory(root))
157 { 157 {
158 throw OrthancException(ErrorCode_CannotWriteFile); 158 throw OrthancException(ErrorCode_CannotWriteFile);
164 now.date().month().as_number(), 164 now.date().month().as_number(),
165 now.date().day().as_number(), 165 now.date().day().as_number(),
166 now.time_of_day().hours(), 166 now.time_of_day().hours(),
167 now.time_of_day().minutes(), 167 now.time_of_day().minutes(),
168 now.time_of_day().seconds(), 168 now.time_of_day().seconds(),
169 Toolbox::GetProcessId()); 169 SystemToolbox::GetProcessId());
170 170
171 std::string programName = exe.filename().replace_extension("").string(); 171 std::string programName = exe.filename().replace_extension("").string();
172 172
173 log = (root / (programName + ".log" + suffix + "." + std::string(date))); 173 log = (root / (programName + ".log" + suffix + "." + std::string(date)));
174 link = (root / (programName + ".log" + suffix)); 174 link = (root / (programName + ".log" + suffix));