Skip to content

Commit

Permalink
ticket-1620 IMA event log scanner moved into external module
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiy-skalelabs committed Oct 26, 2023
1 parent 08162ea commit 95fd542
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions npms/skale-ima/imaEventLogScan.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ function generateWhileTransferringLogMessageSuffix( optsChainPair ) {
cc.debug( " node " ) + cc.info( optsChainPair.optsSpecificS2S.idxNode ) +
cc.debug( ")" );
}
return cc.debug( " (while performing " ) + optsChainPair.strDirection +
return cc.debug( " (while performing " ) + cc.attention( optsChainPair.strDirection ) +
cc.debug( " transfer)" );
}

Expand All @@ -139,26 +139,26 @@ export async function safeGetPastEventsProgressiveExternal(
escapeShell( JSON.stringify( joArg ) );
if( log.verboseGet() >= log.verboseReversed().trace ) {
details.write( strLogPrefix +
cc.debug( "Will run external command to search logs for event" ) +
cc.j( strEventName ) + cc.debug( "via URL " ) + cc.u( joArg ) +
cc.debug( "Will run external command to search logs for event " ) +
cc.j( strEventName ) + cc.debug( " via URL " ) + cc.u( joArg ) +
generateWhileTransferringLogMessageSuffix( optsChainPair ) +
cc.debug( "..." ) + "\n" );
}
const res = childProcessModule.execSync( cmd );
if( "error" in res && res.error ) {
if( log.verboseGet() >= log.verboseReversed().error ) {
details.write( strLogPrefix +
cc.error( "Got error from external command to search logs for event" ) +
cc.j( strEventName ) + cc.error( "via URL " ) + cc.u( joArg ) +
cc.error( "Got error from external command to search logs for event " ) +
cc.j( strEventName ) + cc.error( " via URL " ) + cc.u( joArg ) +
generateWhileTransferringLogMessageSuffix( optsChainPair ) +
cc.error( ":" ) + cc.warning( owaspUtils.extractErrorMessage( err ) ) + "\n" );
}
throw new Error( res.error );
}
if( log.verboseGet() >= log.verboseReversed().trace ) {
details.write( strLogPrefix +
cc.debug( "Done running external command to search logs for event" ) +
cc.j( strEventName ) + cc.debug( "via URL " ) + cc.u( joArg ) +
cc.debug( "Done running external command to search logs for event " ) +
cc.j( strEventName ) + cc.debug( " via URL " ) + cc.u( joArg ) +
generateWhileTransferringLogMessageSuffix( optsChainPair ) +
cc.debug( "." ) + "\n" );
}
Expand Down

0 comments on commit 95fd542

Please sign in to comment.