fix boost log timestamps; comment out windows focus hack

This commit is contained in:
Christopher A. Mosher 2024-04-11 01:29:39 -04:00
parent ada75984e2
commit e6e259ac9e
2 changed files with 15 additions and 12 deletions

View File

@ -36,15 +36,17 @@
#include <wx/stdpaths.h>
#include <wx/debugrpt.h>
#include <boost/date_time/posix_time/posix_time.hpp>
#include <boost/log/core.hpp>
#include <boost/log/trivial.hpp>
#include <boost/log/utility/setup/file.hpp>
#include <boost/log/utility/setup/common_attributes.hpp>
#include <boost/log/sources/severity_feature.hpp>
#include <boost/log/sources/record_ostream.hpp>
#include <boost/log/expressions/formatters/date_time.hpp>
#include <boost/log/expressions/formatters/stream.hpp>
#include <boost/log/expressions.hpp>
#include <boost/date_time/posix_time/posix_time.hpp>
#include <boost/log/support/date_time.hpp>
#include <iostream>
#include <string>
@ -357,14 +359,15 @@ void E2wxApp::InitBoostLog() {
boost::log::add_file_log(
boost::log::keywords::file_name = this->logfile,
boost::log::keywords::auto_flush = true,
boost::log::keywords::format = (
boost::log::expressions::stream <<
to_iso_extended_string(boost::posix_time::microsec_clock::universal_time()) << "Z " <<
boost::log::trivial::severity << " " <<
boost::log::expressions::message
));
boost::log::keywords::file_name = this->logfile,
boost::log::keywords::auto_flush = true,
boost::log::keywords::format = (
boost::log::expressions::stream <<
boost::log::expressions::format_date_time<boost::posix_time::ptime>("TimeStamp", "%Y-%m-%dT%H:%M:%S.%fZ") << " " <<
boost::log::trivial::severity << " " <<
boost::log::expressions::message
)
);
boost::log::add_common_attributes();
}

View File

@ -92,9 +92,9 @@ ScreenImage::~ScreenImage() {
void ScreenImage::OnIdle(wxIdleEvent &evt) {
if (!this->FindFocus() || !this->sdl->HasFocus()) {
this->sdl->SetFocus();
}
// if (!this->FindFocus() || !this->sdl->HasFocus()) {
// this->sdl->SetFocus();
// }
}
void ScreenImage::HandleUserCloseWindowRequest(wxCloseEvent& event) {