Whether generated alerts are saved in some text file?

I wish to refer the generated alerts by scripts later on. Whether they are saved in some text file? Or is there any other way to refer them.

The alerts listed in generated alerts will not be saved as of now