INNER CODE UNIT · Go

readLastMatchingLogRecord

oracle/oracle-db-appdev-monitoring · alertlog/alertlog.go:97

func readLastMatchingLogRecord(logDestination, database string, perDatabaseFiles bool) (LogRecord, error) {
	file, err := os.Open(logDestination)
	if err != nil {
		return LogRecord{}, err
	}
	defer file.Close()

	stat, err := file.Stat()
	if err != nil {
		return LogRecord{}, err
	}
	filesize := stat.Size()
	if filesize == 0 {
		return defaultLastLogRecord, nil
	}

	currentReversed := make([]byte, 0, alertLogReadChunkSize)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…