INNER CODE UNIT · Go
buildAlertLogQuery
oracle/oracle-db-appdev-monitoring · alertlog/alertlog.go:183
func buildAlertLogQuery(lastTimestamp string) (string, []interface{}) {
return alertLogQuery, []interface{}{lastTimestamp}
}
// UpdateLog appends newly queried alert log records for a database to the configured log destination.
func UpdateLog(logDestination string, perDatabaseFiles bool, logLevelEnabled bool, logger *slog.Logger, d *db.Database) {
if !d.StartupReady() {
return
}
// Do not try to query the alert log if the database configuration is invalid.
if d.IsValid() != nil {
return
}
now := time.Now()
if shouldRetry, retryAfter := databaseRetries.shouldRetry(d.Name, now); !shouldRetry {
logger.Debug("Skipping alert log update while database is in backoff", "database", d.Name, "retry_after", retryAfter)
return
}