Redirected the access logs in a dedicated file

This commit is contained in:
emeric
2019-06-07 13:05:22 +02:00
parent 37a41ece1f
commit 76c92cfd5f
2 changed files with 5 additions and 4 deletions
+1 -1
View File
@@ -107,7 +107,7 @@ server {
```sh ```sh
lms [config_file] lms [config_file]
``` ```
Logs are output in the working directory, in the file 'lms.log'. Logs are output in the working directory, in the files 'lms.log' and 'lms.access.log'.
To connect to LMS, just open your favorite browser and go to http://localhost:5082 To connect to LMS, just open your favorite browser and go to http://localhost:5082
+4 -3
View File
@@ -40,8 +40,9 @@ std::vector<std::string> generateWtConfig(std::string execPath)
{ {
std::vector<std::string> args; std::vector<std::string> args;
boost::filesystem::path wtConfigPath = Config::instance().getPath("working-dir") / "wt_config.xml"; const boost::filesystem::path wtConfigPath {Config::instance().getPath("working-dir") / "wt_config.xml"};
boost::filesystem::path wtLogFilePath = Config::instance().getPath("working-dir") / "lms.log"; const boost::filesystem::path wtLogFilePath {Config::instance().getPath("working-dir") / "lms.log"};
const boost::filesystem::path wtAccessLogFilePath {Config::instance().getPath("working-dir") / "lms.access.log"};
args.push_back(execPath); args.push_back(execPath);
args.push_back("--config=" + wtConfigPath.string()); args.push_back("--config=" + wtConfigPath.string());
@@ -63,7 +64,7 @@ std::vector<std::string> generateWtConfig(std::string execPath)
args.push_back("--http-address=" + Config::instance().getString("listen-addr", "0.0.0.0")); args.push_back("--http-address=" + Config::instance().getString("listen-addr", "0.0.0.0"));
} }
args.push_back("--gdb"); args.push_back("--accesslog=" + wtAccessLogFilePath.string());
// Generate the wt_config.xml file // Generate the wt_config.xml file
boost::property_tree::ptree pt; boost::property_tree::ptree pt;