mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2026-04-03 22:36:23 +00:00
Merge branch 'rc-v3.0.2' into rc-v3.1.0
This commit is contained in:
@@ -97,6 +97,25 @@ void TConsole::BackupOldLog() {
|
||||
}
|
||||
}
|
||||
|
||||
enum EscState {
|
||||
None,
|
||||
Escape,
|
||||
FeSeqStart,
|
||||
FeSeqMid,
|
||||
SeqEnd
|
||||
};
|
||||
|
||||
void TConsole::StartLoggingToFile() {
|
||||
mLogFileStream.open("Server.log");
|
||||
Application::Console().Internal().on_write = [this](const std::string& ToWrite) {
|
||||
// TODO: Sanitize by removing all ansi escape codes (vt100)
|
||||
std::unique_lock Lock(mLogFileStreamMtx);
|
||||
mLogFileStream.write(ToWrite.c_str(), ToWrite.size());
|
||||
mLogFileStream.write("\n", 1);
|
||||
mLogFileStream.flush();
|
||||
};
|
||||
}
|
||||
|
||||
void TConsole::ChangeToLuaConsole(const std::string& LuaStateId) {
|
||||
if (!mIsLuaConsole) {
|
||||
if (!mLuaEngine) {
|
||||
|
||||
Reference in New Issue
Block a user