LogFile

ActiveX/VBSScript registry editor  ActiveX NT User account manager  Export MDB/DBF from ASP
Url replacer, IIS url rewrite Active LogFile  Email export  ActiveX/ASP Scripting Dictionary object
 IISTracer, real-time IIS monitor
 Huge ASP upload - upload files with progress.
          Class 
          Member of  ScriptUtils Use LogFile object 

Description

Hi-performance text file logging for ASP and ASP.Net, VBScript, VBA, VB5/6, VB and C# applications. Lets you create daily/weekly/monthly log files with variable number of logged values and extra timing and performance info.

Features of LogFile class

  • Hi-performance text file logging from ASP, VBScript or JScript, ASP.Net VB, C#, VBA5 or VBA6.
  • Free-threaded object, can be placed to Application scope
  • Lets you log exact script timing values (up to microsecond or nanosecond), process and thread info and performance values (see LogLineBeginTypes, LineBegin)
  • Writes one or more (any number) string, numeric, date, object (default property), array and other variables with one row of code to the log (Log)
  • Daily/weekly/monthly log filename scheme, lets you specify common log file header and log field names in each file.

Other features

ActiveLogFile performance

Performance notes and comparison with FileSystemObject and its use to do log files in ASP.

Using LogFile class

How to create and use LogFile class in ASP, VBS and VBA (VB, Excel, Word, ..)

Methods

Close Closes the log file.
Log Lets you write variant number of values as one log line to the log file.
LogLine Write string as one line to the log file.
Open Opens the log file for write.

Properties

ArraySeparatorSeparator of values in an array.
String, RW
DateTimeFormatDefines format for the DateTime fields.
String, RW
EncodeEncoding of logged values. No encoding or URL encode.
LogLineEncodes, RW
FieldSeparatorSeparator of logged values. This property is used to separate values on beggining of line and values from Log method.
String, RW
FieldsHeadersDescription of additional fields in the log file.
String, RW
FileBeginComment on the beggining of the log file.
String, RW
LineBeginDefines fields on a begin of the log line.
LogLineBeginTypes, RW
TemplateFileNameFull template for log path and file name. The template can contains special tags to specify filename for each day/week/month.
String, RW
FileNameFull path and name of the current log file.
String, RO
IsOpenReturns True if the log file is open.
Boolean, RO
LocalDateTimeSpecicifies if Logal or Global (GMT) date and time is logged.
Boolean, RO

Examples

 LogFile - Simple log file sample  
  Dim LogFile 

  'Create LogFile object
  Set LogFile = CreateObject("ScriptUtils.LogFile")
  LogFile.TemplateFileName = "D:\LogFiles\LG%y%m%d.Log"

  'Write one string to the log file
  LogFile.LogLine "some line to the log file."

  'Write more values to the log file
  LogFile.Log "Some", "String", "Or", "Numeric", 25, "Values"
  Other links for LogFile class

ASP file upload and ScriptUtilities classes

ScriptUtils

     Huge ASP upload is easy to use, hi-performance ASP file upload component with progress bar indicator. This component lets you upload multiple files with size up to 2GB to a disk or a database along with another form fields. Huge ASP file upload is a most featured upload component on a market with competitive price and a great performance.

     The software has also a free version of asp upload with progress, called Pure asp upload, written in plain VBS, without components (so you do not need to install anything on server).

     This installation package contains also ScriptUtilities library. Script Utilities lets you create hi-performance log files, works with binary data, you can download multiple files with zip/arj compression, work with INI files and much more with the ASP utility.

  Additional notes
     LogFile is a COM class specially designed as a free-threaded, hi-performance logging object in Application scope of ASP/ASP.Net pages. It also works with other script engines in VB Script and JScript (ASP, ASP.Net, WSH, CHM, HTA), VB Net, Visual basic (VBA - VB 5, VB 6, Word, Excel, Access, …), C#, J#, C++, ASP, ASP.Net, Delphi and with T-SQL OLE functions - see Use ByteArray object article. You can also use the object in other programming environments with COM support, such is PowerBuilder.
     Source code for LogFile is available within distribution license, please see License page for ASP file upload and ScriptUtilities.

© 1996 – 2008 Antonin Foller, Motobit Software, help{at}pstruh.cz, help v. 2.20.24