alert logic