CREATE procedure WriteLog
(
@EventId int,
@Priority int,
@Title varchar(
500
),
@Message varchar(
4000
),
@machineName varchar(
100
),
@Timestamp smalldatetime,
@Severity varchar(
100
),
@AppDomainName varchar(
1000
),
@ProcessId int,
@ProcessName varchar(
500
),
@Win32ThreadId int,
@ThreadName varchar(
500
),
@formattedmessage varchar(
4000
),
@LogId int out
)
AS
begin
INSERT INTO aspnet_entlog
(
EventId,
Priority,
Title,
Message,
Machine,
Timestamps,
Severity,
ApplicationDomain,
ProcessId,
ProcessName,
Win32ThreadId,
ThreadName,
ExtendedProperties
)
VALUES
(
@EventId,
@Priority,
@Title,
@Message,
@machineName,
@Timestamp,
@Severity,
@AppDomainName,
@ProcessId,
@ProcessName,
@Win32ThreadId,
@ThreadName,
@formattedmessage
)
SET @LogId=@@identity
end
|