Skip to content

Commit 2e00e9b

Browse files
author
Clement Champetier
committed
avprocessor app: add --logFile option
1 parent 5ac9c7c commit 2e00e9b

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

app/avProcessor/avProcessor.cpp

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ int main( int argc, char** argv )
8484
{
8585
std::string help;
8686
help += "Usage\n";
87-
help += "\tavprocessor CONFIG.TXT OUTPUT_FILE_NAME [--generate-black] [--verbose] [--help]\n";
87+
help += "\tavprocessor CONFIG.TXT OUTPUT_FILE_NAME [--generate-black] [--verbose] [--logFile] [--help]\n";
8888
help += "CONFIG.TXT\n";
8989
help += "\tEach line will be one stream in the output.\n";
9090
help += "\tPattern of each line is:\n";
@@ -94,6 +94,8 @@ int main( int argc, char** argv )
9494
help += "\tNo profileName: will rewrap the stream\n";
9595
help += "Command line options\n";
9696
help += "\t--generate-black: stream which not referred to an input, will generate an output video stream with black images (by default generate audio stream with silence)\n";
97+
help += "\t--verbose: set log level to AV_LOG_DEBUG\n";
98+
help += "\t--logFile: put log in 'avtranscoder.log' file\n";
9799
help += "\t--help: display this help\n";
98100

99101
// Preload FFmpeg context
@@ -113,14 +115,18 @@ int main( int argc, char** argv )
113115
std::cout << help << std::endl;
114116
return 0;
115117
}
116-
if( arguments.at( argument ) == "--generate-black" )
118+
else if( arguments.at( argument ) == "--generate-black" )
117119
{
118120
useVideoGenerator = true;
119121
}
120-
if( arguments.at( argument ) == "--verbose" )
122+
else if( arguments.at( argument ) == "--verbose" )
121123
{
122124
avtranscoder::Logger::setLogLevel( AV_LOG_DEBUG );
123125
}
126+
else if( arguments.at( argument ) == "--logFile" )
127+
{
128+
avtranscoder::Logger::logInFile();
129+
}
124130
}
125131

126132
// Check required arguments

0 commit comments

Comments
 (0)