diff --git a/README.md b/README.md index 0fd5d6c6..6b5b1cac 100644 --- a/README.md +++ b/README.md @@ -107,7 +107,7 @@ server { ```sh 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 diff --git a/src/main/main.cpp b/src/main/main.cpp index a63b0c47..d8472eff 100644 --- a/src/main/main.cpp +++ b/src/main/main.cpp @@ -40,8 +40,9 @@ std::vector generateWtConfig(std::string execPath) { std::vector args; - 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 wtConfigPath {Config::instance().getPath("working-dir") / "wt_config.xml"}; + 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("--config=" + wtConfigPath.string()); @@ -63,7 +64,7 @@ std::vector generateWtConfig(std::string execPath) 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 boost::property_tree::ptree pt;