Fórum

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

thumbnail
Manish Yadav, modificado 11 Anos atrás.

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

Expert Postagens: 493 Data de Entrada: 26/05/12 Postagens Recentes
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, modificado 11 Anos atrás.

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

Liferay Legend Postagens: 14918 Data de Entrada: 02/09/06 Postagens Recentes
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, modificado 11 Anos atrás.

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

Liferay Legend Postagens: 7942 Data de Entrada: 24/03/10 Postagens Recentes
Just use SMTPAppender

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


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