Format:
Recent snippets matching tags of log4net
private static readonly log4net.ILog _logger = log4net.LogManager.GetLogger( System.Reflection.MethodBase.GetCurrentMethod() .DeclaringType);
183 Views
no comments
public class SqlAppender : AppenderSkeleton { private static readonly string CommandText = "INSERT INTO Log ([Date],[Thread],[Level],[Logger],[Message],[Exception]) VALUES (@log_date, @thread, @log_level, @logger, @message, @exception)"; public string ConnectionString { get; set; } protected override void Append(LoggingEvent loggingEvent) { using (var conn = new SqlConnection(ConnectionString)) using (var cmd = new SqlCommand(CommandText, conn))
270 Views
no comments
Subscribe
Discuss
What's new
What is it
New Snippet
Recent Snippets
My Snippets
Web Code
Search
