Skip to content

Commit

Permalink
Change log level for parsing logs (#198)
Browse files Browse the repository at this point in the history
  • Loading branch information
pvyawaha authored Mar 15, 2021
1 parent 666241d commit 5d7c7f6
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
28 changes: 14 additions & 14 deletions source/ota.c
Original file line number Diff line number Diff line change
Expand Up @@ -1706,7 +1706,7 @@ static DocParseErr_t extractParameter( JsonDocParam_t docParam,

if( err != DocParseErrNone )
{
LogError( ( "Failed to extract document parameter: error=%d, paramter key=%s",
LogDebug( ( "Failed to extract document parameter: error=%d, paramter key=%s",
err, docParam.pSrcKey ) );
}

Expand All @@ -1732,10 +1732,10 @@ static DocParseErr_t verifyRequiredParamsExtracted( const JsonDocParam_t * pMode
{
if( ( missingParams & ( ( uint32_t ) 1U << scanIndex ) ) != 0U )
{
LogInfo( ( "Failed job document content check: "
"Required job document parameter was not extracted: "
"parameter=%s",
pModelParam[ scanIndex ].pSrcKey ) );
LogDebug( ( "Failed job document content check: "
"Required job document parameter was not extracted: "
"parameter=%s",
pModelParam[ scanIndex ].pSrcKey ) );
}
}

Expand Down Expand Up @@ -1818,9 +1818,9 @@ static DocParseErr_t parseJSONbyModel( const char * pJson,

if( err != DocParseErrNone )
{
LogInfo( ( "Failed to parse JSON document as AFR_OTA job: "
"DocParseErr_t=%d",
err ) );
LogDebug( ( "Failed to parse JSON document as AFR_OTA job: "
"DocParseErr_t=%d",
err ) );
}

return err;
Expand Down Expand Up @@ -2000,7 +2000,7 @@ static OtaJobParseErr_t handleCustomJob( const char * pJson,
/* Job is malformed - return an error */
err = OtaJobParseErrNonConformingJobDoc;

LogError( ( "Failed to parse custom job document: OtaJobParseErr_t=%s, jobIdLength=%lu",
LogDebug( ( "Failed to parse custom job document: OtaJobParseErr_t=%s, jobIdLength=%lu",
OTA_JobParse_strerror( jobDoc.parseErr ), jobDoc.jobIdLength ) );
}
}
Expand Down Expand Up @@ -2084,9 +2084,9 @@ static OtaJobParseErr_t verifyActiveJobStatus( OtaFileContext_t * pFileContext,
}
else
{
LogWarn( ( "Parameter check failed: "
"pJobName is NULL while the OTA Agent is busy: "
"Ignoring parameter check failure." ) );
LogDebug( ( "Parameter check failed: "
"pJobName is NULL while the OTA Agent is busy: "
"Ignoring parameter check failure." ) );
err = OtaJobParseErrNullJob;
}

Expand Down Expand Up @@ -2201,7 +2201,7 @@ static OtaJobParseErr_t validateAndStartJob( OtaFileContext_t * pFileContext,
}
else
{
LogError( ( "Failed to validate and start the job: OtaJobParseErr_t=%s", OTA_JobParse_strerror( err ) ) );
LogDebug( ( "Failed to validate and start the job: OtaJobParseErr_t=%s", OTA_JobParse_strerror( err ) ) );
}

return err;
Expand Down Expand Up @@ -2826,7 +2826,7 @@ static void executeHandler( uint32_t index,
}
else
{
LogError( ( "Failed to execute state transition handler: "
LogDebug( ( "Failed to execute state transition handler: "
"Handler returned error: OtaErr_t=%s",
OTA_Err_strerror( err ) ) );
}
Expand Down
2 changes: 1 addition & 1 deletion source/portable/os/ota_os_posix.c
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ OtaOsStatus_t Posix_OtaStopTimer( OtaTimerId_t otaTimerId )
}
else
{
LogWarn( ( "OTA Timer handle NULL for Timerid=%i, can't stop.", otaTimerId ) );
LogDebug( ( "OTA Timer handle NULL for Timerid=%i, can't stop.", otaTimerId ) );

otaOsStatus = OtaOsTimerStopFailed;
}
Expand Down

0 comments on commit 5d7c7f6

Please sign in to comment.