int writeRemoteErrorEvent() { RemoteErrorEvent remoteerror; remoteerror.setExecuteHost("<128.105.165.12:32779>"); remoteerror.setDaemonName("<write job log test>"); remoteerror.setErrorText("this is the write test error string"); remoteerror.setCriticalError(true); if ( !logFile.writeEvent(&remoteerror) ) { printf("Complain about bad remoteerror write\n"); exit(1); } return(0); }
bool LocalUserLog::logStarterError( const char* err_msg, bool critical ) { if( ! is_initialized ) { // This can happen if we hit an error talking to the shadow // before we get the job ad. Just ignore it. return false; } if( ! should_log ) { return true; } RemoteErrorEvent event; event.setErrorText( err_msg ); event.setDaemonName( "starter" ); event.setExecuteHost( daemonCore->InfoCommandSinfulString() ); event.setCriticalError( critical ); if( !u_log.writeEvent(&event) ) { dprintf( D_ALWAYS, "Unable to log ULOG_REMOTE_ERROR event\n" ); return false; } return true; }