Changeset 98f06d9 in opengl-game for logger.cpp


Ignore:
Timestamp:
May 24, 2019, 8:01:34 PM (5 years ago)
Author:
Dmitry Portnoy <dmitry.portnoy@…>
Branches:
feature/imgui-sdl, master, points-test
Children:
a23fc08
Parents:
d9b6a1c
Message:

Add support for ofstream to logger.cpp

File:
1 edited

Legend:

Unmodified
Added
Removed
  • logger.cpp

    rd9b6a1c r98f06d9  
    5252   return true;
    5353}
     54
     55ofstream ofs;
     56
     57void open_log() {
     58   ofs.open(LOG_FILE, ios::out);
     59
     60   time_t now = time(NULL);
     61   string date(ctime(&now));
     62   ofs << "LOG_FILE log. local time " << date << endl;
     63}
     64
     65ofstream& get_log() {
     66   return ofs;
     67}
     68
     69void close_log() {
     70   ofs.close();
     71}
Note: See TracChangeset for help on using the changeset viewer.