about summary refs log tree commit diff stats
path: root/data/maps/the_entry/rooms/D Room Final.txtpb
blob: 960cb1ce59a9cdce589becdb9f30bf798f807ade (plain) (blame)
1
2
3
4
5
generated by cgit-pink 1.4.1 (git 2.36.1) at 2025-10-06 01:07:32 +0000
 


an> Logger {
 public:
  Logger() : logfile_("debug.log") {}

  void LogLine(const std::string& text) {
    std::lock_guard guard(file_mutex_);
    logfile_ << "[" << std::chrono::system_clock::now() << "] " << text
             << std::endl;
    logfile_.flush();
  }

 private:
  std::ofstream logfile_;
  std::mutex file_mutex_;
};

}  // namespace

void TrackerLog(const std::string& text) {
  static Logger* instance = new Logger();
  instance->LogLine(text);
}