Foren

how to Capture all error message in Log file and send the Log file by email

thumbnail
Manish Yadav, geändert vor 11 Jahren.

how to Capture all error message in Log file and send the Log file by email

Expert Beiträge: 493 Beitrittsdatum: 26.05.12 Neueste Beiträge
we have production environment in red-hat. How to Capture all error message in Log file and send the Log file by email??
Do we need shell script or java scheduler or by any other way we can achieve .
if anybody have sample code please share
thumbnail
David H Nebinger, geändert vor 11 Jahren.

RE: how to Capture all error message in Log file and send the Log file by e

Liferay Legend Beiträge: 14918 Beitrittsdatum: 02.09.06 Neueste Beiträge
Scanning the log file may be hit or miss, and relying on that is a poor design for notifying of errors.

For our enterprise portlets, we specifically implement appropriate alert processes on failures. When a failure occurs within our portlets, we invoke the code to send an alert. In our case we're sending SNMP traps to a SiteScope server, but it just as easily could send an email w/ the failure info.
thumbnail
Hitoshi Ozawa, geändert vor 11 Jahren.

RE: how to Capture all error message in Log file and send the Log file by e

Liferay Legend Beiträge: 7942 Beitrittsdatum: 24.03.10 Neueste Beiträge
Just use SMTPAppender

log4j.appender.mail=org.apache.log4j.net.SMTPAppender


But, as David replied, we usually use SNMP traps.