"; } } else if( $_POST['whatsSelected'] == "email" ) { $operationInProgress = true; $status = new ReturnStatus(); $theFile = $_POST['file']; if( $headerString != "") { // Add the Header to the top of the file. $fileNameT = "/tmp/logViewerT"; $theFile = $_POST['fileOnly']; error_log("Create tmp file with header"); $sRet = system("/usr/bin/cmdwrap -NO_END_OF_FILE echo '".$headerString."' > ".$fileNameT, $iRet); error_log("Call to system (echo headerString) returned a \"$iRet\" and the output was \"$sRet\""); $sRet = system("/usr/bin/cmdwrap -NO_END_OF_FILE cat ".$_POST['file']." >> ".$fileNameT, $iRet); error_log("Call to system (cat file) returned a \"$iRet\" and the output was \"$sRet\""); $sRet = system("/usr/bin/cmdwrap -NO_END_OF_FILE chmod 666 ".$fileNameT, $iRet); error_log("Call to system (chmod 666 DriveLog) returned a \"$iRet\" and the output was \"$sRet\""); // Rename the file back to the original. $sRet = system("/usr/bin/cmdwrap -NO_END_OF_FILE mv -f ".$fileNameT." ".$theFile, $iRet); error_log("Call to system (mv to orig) returned a \"$iRet\" and the output was \"$sRet\""); } email_file( $user, $theFile, $_POST['emailAddress'], "Library Log File" ); print $status->out(); return; } } else { $errorText = ""; $headerString = ""; $fileOnly = ""; error_log("_GET = ". print_r($_GET, true) ); if( $_GET['logFile'] == "ivtSummaryLog" ) { $logFileLabel = "IVT Summary Log"; $logFileToShow = "/home/embedded/library/CoreService/dat/IVTStatus.txt"; $hiddenFileValue = "ivtSummaryLog"; $errorText = "Note: You first need to run the |Installation %26 Verification Tests| from the local Operator Panel."; } else if( $_GET['logFile'] == "ivtDetailedLog" ) { $logFileLabel = "IVT Detailed Log"; $logFileToShow = "/home/embedded/library/CoreService/dat/IVTLog.txt"; $hiddenFileValue = "ivtDetailedLog"; $errorText = "Note: You first need to run the |Installation %26 Verification Tests| from the local Operator Panel."; } else if( $_GET['logFile'] == "commandHistoryLog" ) { $logFileLabel = "Command History Log"; $logFileToShow = "/tmp/commandHistory.log"; $hiddenFileValue = "commandHistoryLog"; // Create the log file error_log("\n\nRunning: create_command_history_log(user, ".$_GET['bladeSel'].", ".$_GET['dev'].");\n\n" ); create_command_history_log($user, $_GET['bladeSel'], (int)$_GET['dev']); } else if( $_GET['logFile'] == "cleaninglog" ) { $logFileLabel = "Cleaning Log"; $logFileToShow = "/home/embedded/library/CoreService/dat/CleaningLog.csv"; $hiddenFileValue = "cleaninglog"; $errorText = "Note: No cleanings have been performed."; $headerString = "Date Time,Barcode, Tape, Drive, Status, Return Code, Cleaning Type, Expired, Usage Count, Reserved"; $fileOnly = "/tmp/CleaningLog.csv"; } else if( $_GET['logFile'] == "shposlog" ) { $logFileLabel = "Slot Position Log"; $logFileToShow = "/home/embedded/library/CoreService/dat/SlotPositionLog.csv"; $hiddenFileValue = "shposlog"; $headerString = "Date Time, SlotType, Present, Location, X, Y, Angle, X offset, Y Offset"; $fileOnly = "/tmp/SlotPositionLog.csv"; } else if( $_GET['logFile'] == "rasTicketsLog" ) { @report_ras_tickets(); $logFileLabel = "RAS Tickets Log"; $logFileToShow = "/tmp/RASticketReports.log"; $hiddenFileValue = "rasTicketsLog"; } else { $logFileLabel = "NO FILE SELECTED"; } } // Check if file exists error_log("logFileToShow = ". $logFileToShow); @check_file_exists( $logFileToShow ); // Test for email configuration $emailConfig = get_email_configuration($user); if( isset($emailConfig) ) { if( trim($emailConfig->smtpServer) != '' ) $isEmailConfigured = "true"; } function check_file_exists( $filename ) { global $fileNotFound; $fh = fopen( $filename, 'rb' ); if( $fh == false ) { $fileNotFound = "true"; } else { fclose( $fh ); } } ?> Log Viewer
>
Reports - Log Viewer
View library logs.
Note: You can e-mail or save the log shown.
File:   :