Post date: Mar 06, 2018 10:58:6 PM
qbo.Logging has been extended with RollingLog and RollingLogTraceListener classes. This extends LogEntry (ETL) functionality for anyone wishing to log RollingLog from all machines to an outside database / table (dbo.RollingLog). This table can be accessed from the front-end UI via /Logging/RollingLog.ashx/ or /Logging/Logging.ashx > DailyLogTable.
Features:
This update was built with standalone Logging in mind. As such:
To Log and/or Search, RollingLogTraceListenerData will scan your connection strings for one of name: "qbo.Logging". Should "qbo.Logging" not exist in your connection strings, it will cascade to your "qbo.Default" connection.
RollingLog is implemented entirely as an ISearchable and performs individual sqlClient queries for inserting RollingLog entries, searching records, and dashboard display.
RollingLog.ashx routes through the RollingLogTraceListener to perform ISearchable hits.
Note that ISearchable and all tracelisteners that implement it have been extended with a Dashboard method. This will be a breaking change, meaning you will want to get latest on qbo.Logging, qbo.Logging.Amazon, and qbo.Message.Amazon since these projects implement ISearchable TraceListeners.
You can now query and filter RollingLog directly from the front-end.
Hit the magnifying glass to expand filter options.
The "Message" field contains most of your error message. We have added a Full-Text Index to this column and will support Full-Text Index query notation.
msdn offers some support here: https://docs.microsoft.com/en-us/sql/t-sql/queries/contains-transact-sql
Message supports the following:
{ AND | & } | { AND NOT | &! } | { OR | | } : searchTerm1 AND searchTerm2
{ OR | | } : searchTerm1 OR searchTerm2
{ NEAR | ~ } : searchTerm1 NEAR searchTerm2
Chained NEAR: searchTerm1 ~ searchTerm2 ~ searchTerm3
Prefixing -- akin to Quand%: "Quand*"
Note that "Message" still supports using "%" in searches but these queries are not indexed and may be non-performant.
Notes:
Searches automatically filter records based on qbo.Application default settings for SiteName.
This prevents the scenario in which SLS can see QMS RollingLog records.
With Phase I, we've ensured that the RollingLog table captures all exceptions currently being captured by RollingLog.txt
Phase II we might consider logging IIS errors or Event Logs.
Deployment Instructions:
Get latest qbo.Logging, qbo.LogginWeb, qbo.Logging.Amazon, qbo.Message.Amazon, qbo.Application
In web.config, add or uncomment "DailyLogTable" under loggingConfiguration > Listeners and under categorySources > add[name = "General"] > Listeners
Ensure connection strings has a connection for "qbo.Logging". Ping the QMS team for this.
Deploy and test.