Revision 261 includes.
Complete re-write of the error logging system to allow us to find those bugs that are not reported by dashCommerce with more information for helping us debug them.
1. All thrown exceptions now logged automatically no need for try, catch blocks unless you want to handle the exception, this even includes providers!
- Currently it's set to log all errors including 404's this many be usefull for some or just annoying for others anyways we store them as different types.
- The current codebase has a lot of methods with Try, Catch with throw; in the catch those code can be cleaned up and removed.
2. Much more useful information is stored on each exception for debugging including Authenticated User Name, User Agent (Browser, Goglebot etc), Remote Host, Referrer, Cookie/Form/QueryString Data, Script Name, Machine Name.
- This required a scheme change on the dashCommerce_Core_Log table I felt the extra information was very usefull and since the table is only for logging without any sensitive data it was safe to add those fields.
3. Removed Dependencies/log4net.dll
- Not needed anymore all logging is now handled by Core.Logger itself.
4. Removed Insert and FetchAll Logs stored procedures.
- We can just use Subsonic to write the logs and fetch them.
All new installs would have to do anything but to upgrade an existing site run the following SQL
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[dashCommerce_Core_Log]') AND type in (N'U'))
DROP TABLE [dbo].[dashCommerce_Core_Log]
GO
CREATE TABLE [dbo].[dashCommerce_Core_Log](
[LogID] [int] IDENTITY(1,1) NOT NULL,
[LogDate] [datetime] NOT NULL CONSTRAINT [DF_Script_Message_Log_Log_Date] DEFAULT (getdate()),
[Message] [text] NULL,
[MessageType] [tinyint] NOT NULL,
[UserAgent] [varchar](256) NULL,
[RemoteHost] [varchar](256) NULL,
[AuthUser] [varchar](64) NULL,
[Referer] [varchar](512) NULL,
[MachineName] [varchar](32) NULL,
[FormData] [text] NULL,
[QueryStringData] [varchar](512) NULL,
[CookiesData] [varchar](2048) NULL,
[ExceptionType] [varchar](256) NULL,
[ScriptName] [varchar](256) NULL,
[ExceptionMessage] [varchar](512) NULL,
[ExceptionSource] [varchar](256) NULL,
[ExceptionStackTrace] [varchar](2048) NULL,
CONSTRAINT [PK__dashCommerce_Cor__457F2FDE] PRIMARY KEY CLUSTERED
(
[LogID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 80) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
www.objectreference.net - My Blog
www.vortexleather.com - My Leather clothing store
Find a bug?
Create a Work Item for a fast response.. Want to help?
Create a patch for us!