| 112 | } |
| 113 | |
| 114 | void beginFunction(const std::string & callerName, |
| 115 | const std::string & function) |
| 116 | { |
| 117 | if (!_file) { |
| 118 | QString filename(NATRON_APPLICATION_NAME + QString("_log") + QString::number( QCoreApplication::instance()->applicationPid() ) + ".txt"); |
| 119 | open( filename.toStdString() ); |
| 120 | } |
| 121 | QMutexLocker locker(&_lock); |
| 122 | _stream->operator <<("********************************************************************************\n"); |
| 123 | for (int i = 0; i < _beginsCount; ++i) { |
| 124 | _stream->operator <<(" "); |
| 125 | } |
| 126 | _stream->operator <<("START "); |
| 127 | _stream->operator <<( callerName.c_str() ); |
| 128 | _stream->operator <<(" "); |
| 129 | _stream->operator <<( function.c_str() ); |
| 130 | _stream->operator <<('\n'); |
| 131 | _stream->flush(); |
| 132 | ++_beginsCount; |
| 133 | } |
| 134 | |
| 135 | void print(const std::string & log) |
| 136 | { |
nothing calls this directly
no test coverage detected