Index: trunk/src/log4net/Appender/SmtpPickupDirAppender.cs =================================================================== --- trunk/src/log4net/Appender/SmtpPickupDirAppender.cs (revision 1697459) +++ trunk/src/log4net/Appender/SmtpPickupDirAppender.cs (working copy) @@ -50,6 +50,7 @@ /// /// Niall Daley /// Nicko Cadell + /// Albin Sunnanbo public class SmtpPickupDirAppender : BufferingAppenderSkeleton { #region Public Instance Constructors @@ -64,6 +65,7 @@ /// public SmtpPickupDirAppender() { + m_fileExtension = string.Empty; // Default to empty string, not null } #endregion Public Instance Constructors @@ -137,6 +139,35 @@ } /// + /// Gets or sets the file extension for the generated files + /// + /// + /// The file extension for the generated files + /// + /// + /// + /// The file extension for the generated files + /// + /// + public string FileExtension + { + get { return m_fileExtension; } + set + { + m_fileExtension = value; + if (m_fileExtension == null) + { + m_fileExtension = string.Empty; + } + // Make sure any non empty extension starts with a dot + if (!string.IsNullOrEmpty(m_fileExtension) && !m_fileExtension.StartsWith(".")) + { + m_fileExtension = "." + m_fileExtension; + } + } + } + + /// /// Gets or sets the used to write to the pickup directory. /// /// @@ -306,6 +337,7 @@ private string m_from; private string m_subject; private string m_pickupDir; + private string m_fileExtension; /// /// The security context to use for privileged calls