Project

General

Profile

New-LogSmtpAppender » History » Version 3

Version 2 (Laurent Dardenne, 11/03/2009 01:56 PM) → Version 3/4 (Laurent Dardenne, 11/03/2009 01:56 PM)

h1. New-LogSmtpAppender

<pre>


function global:New-LogSmtpAppender( [String] $LayoutPattern,
[string] $Name,
[log4net.Core.ITriggeringEventEvaluator] $Evaluator,
#the e-mail address of the sender.
[String] $From=$(Throw $LogDatas.Get("NecessaryParameter","New-LogSmtpAppender","From")),
[String] $Subject,
#a semicolon-delimited list of recipient e-mail addresses.
[String] $To=$(Throw $LogDatas.Get("NecessaryParameter","New-LogSmtpAppender","To")),
[String] $Username=[String]::Empty,
[String] $Password=[String]::Empty,
#Size of event number
[Int32] $BufferSize=512,
[int32] $Port=25,
[System.Net.Mail.MailPriority] $Priority=[System.Net.Mail.MailPriority]::Normal,
[String] $SmtpHost=$(Throw $LogDatas.Get("NecessaryParameter","New-LogSmtpAppender","SmtpHost")),
[log4net.Appender.SmtpAppender+SmtpAuthentication] $Authentication=
[log4net.Appender.SmtpAppender+SmtpAuthentication]::None)


</pre>
Crée un appender SMTP, permet d'envoyer certains logs($Evaluator) par mail.