You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

WriteLog.sql 945B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /****** Object: Stored Procedure dbo.WriteLog Script Date: 10/1/2004 3:16:36 PM ******/
  2. CREATE PROCEDURE [dbo].[WriteLog]
  3. (
  4. @EventID int,
  5. @Priority int,
  6. @Severity nvarchar(32),
  7. @Title nvarchar(256),
  8. @Timestamp datetime,
  9. @MachineName nvarchar(32),
  10. @AppDomainName nvarchar(512),
  11. @ProcessID nvarchar(256),
  12. @ProcessName nvarchar(512),
  13. @ThreadName nvarchar(512),
  14. @Win32ThreadId nvarchar(128),
  15. @Message nvarchar(1500),
  16. @FormattedMessage ntext,
  17. @LogId int OUTPUT
  18. )
  19. AS
  20. INSERT INTO [Log] (
  21. EventID,
  22. Priority,
  23. Severity,
  24. Title,
  25. [Timestamp],
  26. MachineName,
  27. AppDomainName,
  28. ProcessID,
  29. ProcessName,
  30. ThreadName,
  31. Win32ThreadId,
  32. Message,
  33. FormattedMessage
  34. )
  35. VALUES (
  36. @EventID,
  37. @Priority,
  38. @Severity,
  39. @Title,
  40. @Timestamp,
  41. @MachineName,
  42. @AppDomainName,
  43. @ProcessID,
  44. @ProcessName,
  45. @ThreadName,
  46. @Win32ThreadId,
  47. @Message,
  48. @FormattedMessage)
  49. SET @LogID = @@IDENTITY
  50. RETURN @LogID