Merge pull request #2653 from akortunov/log

Improve BetaComment handling
pull/556/head
Alexei Dobrohotov 5 years ago committed by GitHub
commit 87f9b85e21
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -197,6 +197,7 @@
Feature #3980: In-game option to disable controller
Feature #3999: Shift + Double Click should maximize/restore menu size
Feature #4001: Toggle sneak controller shortcut
Feature #4129: Beta Comment to File
Feature #4209: Editor: Faction rank sub-table
Feature #4255: Handle broken RepairedOnMe script function
Feature #4316: Implement RaiseRank/LowerRank functions properly

@ -400,17 +400,7 @@ namespace MWGui
struct tm* timeinfo;
timeinfo = localtime(&time);
// Use system/environment locale settings for datetime formatting
char* oldLctime = setlocale(LC_TIME, nullptr);
setlocale(LC_TIME, "");
const int size=1024;
char buffer[size];
if (std::strftime(buffer, size, "%x %X", timeinfo) > 0)
text << buffer << "\n";
// reset
setlocale(LC_TIME, oldLctime);
text << std::put_time(timeinfo, "%Y.%m.%d %T") << "\n";
text << "#{sLevel} " << mCurrentSlot->mProfile.mPlayerLevel << "\n";
text << "#{sCell=" << mCurrentSlot->mProfile.mPlayerCell << "}\n";

@ -1,10 +1,13 @@
#include "miscextensions.hpp"
#include <cstdlib>
#include <iomanip>
#include <components/compiler/opcodes.hpp>
#include <components/compiler/locals.hpp>
#include <components/debug/debuglog.hpp>
#include <components/interpreter/interpreter.hpp>
#include <components/interpreter/runtime.hpp>
#include <components/interpreter/opcodes.hpp>
@ -1222,6 +1225,11 @@ namespace MWScript
std::stringstream msg;
msg << "Report time: ";
std::time_t currentTime = std::chrono::system_clock::to_time_t(std::chrono::system_clock::now());
msg << std::put_time(std::gmtime(&currentTime), "%Y.%m.%d %T UTC") << std::endl;
msg << "Content file: ";
if (!ptr.getCellRef().hasContentFile())
@ -1263,6 +1271,8 @@ namespace MWScript
--arg0;
}
Log(Debug::Warning) << "\n" << msg.str();
runtime.getContext().report(msg.str());
}
};

Loading…
Cancel
Save