Example #1
0
        public void TestInstantiateAndActicvateAppenderSampleManditoryFields()
        {
            var appender = new log4net.Appender.HtmlSmtpAppender()
            {
                To   = "*****@*****.**",
                From = "*****@*****.**",
            };

            appender.ActivateOptions();

            Assert.IsNotNull(appender);
        }
        private static void PerformLoggingWithFixOption(FixFlags fixFlags)
        {
            var appender = new log4net.Appender.HtmlSmtpAppender()
            {
                Name = "TestInstance",
                To   = "*****@*****.**",
                From = "*****@*****.**",
                Fix  = fixFlags,
            };

            appender.ActivateOptions();

            BasicConfigurator.Configure(appender);
        }
        public void InitialiseLog4Net()
        {
            var appender = new log4net.Appender.HtmlSmtpAppender
            {
                Name      = "TestInstance",
                To        = "Greg Brackley <*****@*****.**>",
                From      = "*****@*****.**",
                Transport = "smtp://smtp.lucidsolutions.co.nz",
                Subject   = "[TEST] %events{triggering} of %events{total} [%events{class.unrecoverable},%events{class.recoverable},%events{class.information},%events{class.debug}] (lost %events{lost})",
            };

            appender.ActivateOptions();
            BasicConfigurator.Configure(appender);
            LogLog.InternalDebugging = true;
        }