//8
 public static BackgroundLogger BackgroundSqlLogger(
     this LoggingWizardCharms charms,
     SqlLogSchema schema
     )
 {
     return(BackgroundSqlLogger(
                charms,
                schema,
                new MinimumLogLevelVerifier(LogLevel.Debug)
                ));
 }
 //1
 public static SqlLogger SqlLogger(
     this LoggingWizardCharms charms,
     SqlLogSchema schema,
     ILogRecordVerifier recordVerifier
     )
 {
     return(new SqlLogger(schema)
     {
         RecordVerifier = recordVerifier
     });
 }
 //3
 public static SqlLogger SqlLogger(
     this LoggingWizardCharms charms,
     SqlLogSchema schema,
     LogLevel minLevel = LogLevel.Debug
     )
 {
     return(SqlLogger(
                charms,
                schema,
                new MinimumLogLevelVerifier(minLevel)
                ));
 }
        //1
        public static BackgroundLogger BackgroundSqlLogger(
            this LoggingWizardCharms charms,
            SqlLogSchema schema,
            ILogRecordVerifier recordVerifier
            )
        {
            var baseLogger = new SqlLogger(schema)
            {
                RecordVerifier = recordVerifier
            };

            return(charms.BackgroundLogger(baseLogger));
        }
        //5
        public static BackgroundLogger BackgroundSqlLogger(
            this LoggingWizardCharms charms,
            ILogRecordVerifier recordVerifier,
            Action <SqlLogSchemaConfig> schemaApply
            )
        {
            var args = new SqlLogSchemaConfig();

            schemaApply(args);

            var schema = new SqlLogSchema(
                args.ConnectionString,
                args.TableName,
                args.InitScript,
                args.Columns
                );

            return(BackgroundSqlLogger(
                       charms,
                       schema,
                       recordVerifier
                       ));
        }
Example #6
0
 public SqlLogger(SqlLogSchema schema)
     : base(schema)
 {
 }