I want to sent error message as email whenever error occurs.
I know it is possible using configuration file of log4j.I want to sent mail using log4j using properties file for setting the properties instead of a xml file.
I want to sent error message as email whenever error occurs.
I know it is possible using configuration file of log4j.I want to sent mail using log4j using properties file for setting the properties instead of a xml file.
You need to use SMTPAppender to send emails using log4j. See a list of properties here on this page:
https://logging.apache.org/log4j/2.x/manual/appenders.html
The following question has a full solution on how to use log4j SMTPAppender.