ICECCallbacks g_callbacks;
libcec_configuration g_config;
-int g_cecLogLevel(CEC_LOG_ALL);
+int g_cecLogLevel(-1);
+int g_cecDefaultLogLevel(CEC_LOG_ALL);
ofstream g_logOutput;
bool g_bShortLog(false);
CStdString g_strPort;
else if (!strcmp(argv[iArgPtr], "--list-devices") ||
!strcmp(argv[iArgPtr], "-l"))
{
+ if (g_cecLogLevel == -1)
+ g_cecLogLevel = CEC_LOG_WARNING + CEC_LOG_ERROR;
ICECAdapter *parser = LibCecInitialise(&g_config);
if (parser)
{
else if (!strcmp(argv[iArgPtr], "--help") ||
!strcmp(argv[iArgPtr], "-h"))
{
+ if (g_cecLogLevel == -1)
+ g_cecLogLevel = CEC_LOG_WARNING + CEC_LOG_ERROR;
+
ShowHelpCommandLine(argv[0]);
return 0;
}
if (!ProcessCommandLineArguments(argc, argv))
return 0;
+ if (g_cecLogLevel == -1)
+ g_cecLogLevel = g_cecDefaultLogLevel;
+
if (g_config.deviceTypes.IsEmpty())
{
if (!g_bSingleCommand)