Please see documentarion here: http://galratner.com/blogs/net/archive/2011/02/13/a-simple-fast-configuration-less-rolling-file-appender.aspx

This is an example database used with PLogger:

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[Error](
	[ErrorID] [int] IDENTITY(1,1) NOT NULL,
	[ErrorName] [varchar](8000) NULL,
 CONSTRAINT [PK_Error] PRIMARY KEY CLUSTERED 
(
	[ErrorID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object:  StoredProcedure [dbo].[AddError]    Script Date: 12/15/2011 16:05:12 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[AddError]
	@ErrorName varchar(8000)
AS
BEGIN
	
	SET NOCOUNT ON;
 
	INSERT INTO [Exceptions].[dbo].[Error]
		   ([ErrorName])
	 VALUES
		   (@ErrorName)
END
GO

Last edited Dec 16, 2011 at 3:59 PM by InvertedSoftware, version 2

Comments

No comments yet.