Example #1
0
        private static void AddDateTimeParameterToAppender(this AdoNetAppender appender, string paramName)
        {
            AdoNetAppenderParameter param = new AdoNetAppenderParameter();

            param.ParameterName = paramName;
            param.DbType        = System.Data.DbType.DateTime;
            param.Layout        = new RawUtcTimeStampLayout();
            appender.AddParameter(param);
        }
Example #2
0
        private static void AddStringParameterToAppender(this AdoNetAppender appender, string paramName, int size, string conversionPattern)
        {
            AdoNetAppenderParameter param = new AdoNetAppenderParameter();

            param.ParameterName = paramName;
            param.DbType        = System.Data.DbType.String;
            param.Size          = size;
            param.Layout        = new Layout2RawLayoutAdapter(new PatternLayout(conversionPattern));
            appender.AddParameter(param);
        }
Example #3
0
        private static void AddErrorParameterToAppender(this AdoNetAppender appender, string paramName, int size)
        {
            AdoNetAppenderParameter param = new AdoNetAppenderParameter();

            param.ParameterName = paramName;
            param.DbType        = System.Data.DbType.String;
            param.Size          = size;
            param.Layout        = new Layout2RawLayoutAdapter(new ExceptionLayout());
            appender.AddParameter(param);
        }