I am using webapplicaton and i am able to store the log error(default which is provided by log4net)in the table.
But i want to add some more column and want to store the error in that field to.
CREATE TABLE [dbo].[Log] (
[Id] [int] IDENTITY (1, 1) NOT NULL,
[Date] [datetime] NOT NULL,
[Thread] [varchar] (255) NOT NULL,
[Level] [varchar] (50) NOT NULL,
[Logger] [varchar] (255) NOT NULL,
[Message] [varchar] (4000) NOT NULL,
[Exception] [varchar] (2000) NULL
)
Now want to increase the 3 column in above table.
1. ErrorSource
2. ErrorCode(API Status Error Code)
3. StackTrace
So how can i use custom log using log4net library?
Any help would be appreciated?
What I have tried:
How to store log in database using log4net | Sadi02's Weblog[
^]
I have used above link and successfully saving the log. Now So how can i use custom log using log4net library?