INNER CODE UNIT · Go

UpdateLog

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

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
	}
	logDestination = logDestinationForDatabase(logDestination, d.Name, perDatabaseFiles)

	// check if the log file exists, and if not, create it
	if _, err := os.Stat(logDestination); errors.Is(err, os.ErrNotExist) {
		logger.Info("Log destination file does not exist, will try to create it: "+logDestination, "database", d.Name)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…