Skip to content

Commit

Permalink
Finally fixed the bug whew
Browse files Browse the repository at this point in the history
  • Loading branch information
yousefg-codes committed Aug 7, 2024
1 parent 5250cda commit 448bf46
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 16 deletions.
12 changes: 0 additions & 12 deletions UsageEnvironment/Log.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,21 +70,11 @@ string LogLevelAsString(LogLevel logLevel) {
}
}

void _Log::OutputToFile(const string filePath) {
currLogFilePath = filePath;
}

void _Log::OutputToStdout(bool toStdout) {
logToStdout = toStdout;
}

_Log::_Log(const string logDirectory) : logLevel(LogLevelDebug) {
printf("Welcome to the constructor with a %s default\n", logDirectory.c_str());
SetTmpLogDir(logDirectory);
}

_Log::_Log() : logLevel(LogLevelDebug) {
printf("Welcome to the default constructor\n");
SetTmpLogDir("");
}

Expand All @@ -108,9 +98,7 @@ FILE* _Log::AcquireFile() {
void _Log::SetTmpLogDir(std::string logDirectory) {
logFileDir = logDirectory;

printf("Setting tmp log dir.\n");
if (kMaxLogs == 0 || logDirectory.empty()) { // Use stdout
printf("Using stdout.\n");
currLogFilePath = "";
logToStdout = true;
return;
Expand Down
2 changes: 0 additions & 2 deletions UsageEnvironment/include/Log.hh
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@ public:
~_Log() {}

void BackupLog(const std::string backupFileName);
void OutputToFile(const std::string filePath);
void OutputToStdout(bool toStdout);
void SetLevel(LogLevel level);
void SetTmpLogDir(std::string logDirectory);

Expand Down
2 changes: 0 additions & 2 deletions testProgs/testH264VideoStreamer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,6 @@ int main(int argc, char** argv) {
*env << "Beginning streaming...\n";
play();

Log.OutputToFile("/Users/adeel.abbas/Downloads/rtsp-issue/live555-logging/output.log");

env->taskScheduler().doEventLoop(); // does not return

return 0; // only to prevent compiler warning
Expand Down

0 comments on commit 448bf46

Please sign in to comment.