Files: eLog.dll
Create date: 12/98
Author: Scott Petersen
Updated: 11/08/99 by Scott Petersen
Description: Added "NAME" as valid LogEventDetail Category.
Updated: 2/16/01 by Scott Petersen
Description: Updated documentation and added NOTIFY alert capability.
Location: c:\eComponents\eLog.dll on each system
Related links: http://msdn.microsoft.com/scripting/
Component technologies employed: Visual Basic 6.0, ADO 2.0
Description and Usage:
eLog.dll should be used whenever something needs to be logged in any automated or manual application. This component is simply a thin wrapper on entering data into a central SQL Server database (called eLog). Performance should be negligible in most cases. This component leaves it entirely to the developer to determine when logging of some activity and how much detail is necessary.
Sample Call:
Dim lKey, objLog
Set objLog = CreateObject("eLog.cElog")
' ProgramID, "Source", "Category", lKey
objLog.LogEventEx 0001, "Import Data", "AUTOPROCESS", lKey
objLog.LogEventDetail lKey, "Category", "Description 1"
Set objLog = NothingField Definitions:
ProgramID - The program ID obtained from
http://sysop.e-net.com/eLog/schedprog/programlist.aspSource - The developer must determine what is appropriate. It is recommended that only a few unique values be used for this per application. One suggestion if the Program is only used for one client is to use the eCentral ClientCode in the Source field. The ClientCode is usually their web site folder name (all lower case).
Category for LogEvent - The developer must determine what is appropriate. It is recommended that only a few unique values be used for this per application. Suggested examples are: AUTOPROCESS, MANUALPROCESS, IMAGES, DATA, FILETRANSFER, DOWNLOAD, UPLOAD, REALSELECTDATA, REALSELECTPHOTOS.
Category for LogEventDetail - START, NAME, RUNNING, END, SUCCESS, FAILURE, WARNING, NOTIFY.
lKey - The Log key value passed back by the LogEvent method. This key value is used to tie the multiple Detail records to the LogEvent.\
Automated Alerting Capability:
The following LogEventDetail Categories will generate an automated alert to the primary and secondary contact listed for the ProgramID. If the contacts in the people table have pager email addresses, these will be emailed as well (up to 2 separate emails would be sent to the primary and the secondary contact for each event). The process to generate the automated alerts runs on the primary auto-process machine (currently Bilbo) every 15 minutes.
FAILURE (LogEventDetail) - Email and page the primary and secondary contacts.
NOTIFY (LogEventDetail) - Email the primary and secondary contact.SQL Server Maintenance/Troubleshooting FAQ:
2/27/2000 - Erroneous eLog records were written for a specific ProgramID during testing, can I delete them?
Simply set the Log Life Event Days to 0 and then manually run sp_PurgeOldLogs. This action will delete ALL log records for any ProgramID's set to 0.
Note: It may take a very long time for sp_PurgeOldLogs to run very large deletes (for example 2.5 million rows takes about 30 minutes.) If you are running such large purges, be sure to dump the transaction log for eLog frequently, and keep an eye on free disk space on the SQL server.xx/xx/xxxx - xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxx