Package ch.k43.util
Klasse KLogSMTPHandler
java.lang.Object
java.util.logging.Handler
ch.k43.util.KLogSMTPHandler
Java logging handler to send logging data to an SMTP host. To avoid a high number of emails sent to the server,
only log data of type error SEVERE is sent. Additionally the number of emails per minutes is restricted.
The following properties are supported:
ch.k43.util.KLogSMTPHandler.mail.from = Sender email address ch.k43.util.KLogSMTPHandler.mail.to = recipient(s) ch.k43.util.KLogSMTPHandler.mail.subject = subject (default "KLog Error Report") ch.k43.util.KLogSMTPHandler.smtp.hostname = host name (default MX record of first recipient domain) ch.k43.util.KLogSMTPHandler.smtp.hostport = host port (default 25) ch.k43.util.KLogSMTPHandler.smtp.username = user name for authentication (default none) ch.k43.util.KLogSMTPHandler.smtp.password = user password for authentication (default none) ch.k43.util.KLogSMTPHandler.smtp.tls = true/false (default true) ch.k43.util.KLogSMTPHandler.threshold = nn (maximum number of emails per minute, 1 to 10, default 3) ch.k43.util.KLogSMTPHandler.debug = true/false (Output sent to System.out/System.err, default false)
- Seit:
- 2024.08.26
-
Konstruktorübersicht
-
Methodenübersicht
Von Klasse geerbte Methoden java.util.logging.Handler
getEncoding, getErrorManager, getFilter, getFormatter, getLevel, isLoggable, setEncoding, setErrorManager, setFilter, setFormatter, setLevel
-
Konstruktordetails
-
KLogSMTPHandler
public KLogSMTPHandler()Class constructor.
-
-
Methodendetails
-
close
public void close()Close the handler. -
flush
public void flush()Flush the data. -
publish
Send log record a email to SMTP host. -
toString
String representation of object.
-