|
Chilkat Log Reference
Click
Here for the Chilkat Log Guide
Docs:
Certificate
Crypt
XML
Mail
MHT
S/MIME
Zip
XMsg
SSL
RTC
Charset
CkStringArray
CkData
ChilkatCSP Log
The ChilkatLog ActiveX
control is an error-logging object that is standard for all Chilkat
ActiveX controls. Here is a reference of the properties and methods.
- ChilkatLog
Properties
- ComponentName As String read-only
- The name of the component hosting
this ChilkatLog instance. Your application can also use ChilkatLog
directly.
- ContinuationPrefix As String
read/write
- For longer messages that span
multiple lines, this string is prepended to each line after
the first. For example, if the ContinuationPrefix is "....",
you could have an error message look like this:
This is a long error message. Blah blah blah blah
....blah blah blah blah blah blah blah blah blah blah
....blah blah blah blah blah blah blah blah blah blah
....blah blah blah blah blah
-
- IsHTML As Boolean read/write
- Indicates whether the messages
are intended to be interpreted by an HTML parser. If so, the
ChilkatLog control escapes characters that are special to HTML.
- HighWaterMark As Long read/write
- When the number of messages in
the log reaches the high-water mark, it is cleared when CheckHighWater
is called.
- LineFormat
As String read/write
- Each error message is formatted
according to this string, which contains special keywords that
are replaced by the message data. The default format is "__STANDARD_\r\n"
which provides for CRLF line-endings that are friendly to Visual
Basic programs. The "_STANDARD_" is a keyword that
is replaced with the message data in a standard format.
This is the default format used for all entries where a named
format (see below) is not specified.
The valid keywords are listed below:
-
-
- _STANDARD_
- Generates the date &
time, severity, and message text in this format:
mon/day/year hour:min (ERROR|INFO)
<Message Text>
- _MDY_
- Replaced with the
mon/day/year
of when the message was logged.
- _DMY_
- Replaced with the
day/month/year
of when the message was logged.
- _HMS_
- Replaced with the
hour:minute:second
of when the message was logged.
- _KEYWORD_
- Replaced with the keyword
associated with this message, if any.
- _MESSAGE_
- Replaced with the message
text .
- _STATUS_
- Replaced with either "ERROR"
or "INFO" depending on the severity of the message.
Here are some examples:
-
-
- "_STANDARD_<br>"
- If your component is used
within Active Server Pages, this is an easy way to produce
simple HTML.
- "<b>_MDY_ _HMS_</b><font
face="Tahoma">_MESSAGE_ <br>"
- A more customized way to
create an HTML error log.
- "My App Name: _MDY_
-- _MESSAGE_" + vbCRLF
- Formats the message to include
the date, the message text, along with the application's
name and ending with a carriage-return/line-feed.
-
- Version As String read-only
- The version of the ChilkatLog
component.
-
ChilkatLog
Methods
-
-
- AppendToFile(fileName
as String) As Boolean
- Appends the messages to a file.
Returns true if successful.
-
- CheckHighWater()
- Clears the log if the number
of messages exceeds the high-water mark.
-
- ClearLog()
- Clears all messages from the
log.
-
- EnterContext(contextName as
String, reportErrors as Boolean)
- Creates a new XML element in
the log within which all subsequent messages will be logged
until closed with a LeaveContext call.
-
- GetDebugEntries() as String
- Returns all the messages in the
log.
- GetErrorEntries() as String
- Returns only the error messages
in the log.
- GetInfoEntries() as String
- Returns all the informational
and error messages in the log, but excludes the debug messages.
- GetKeywordEntries(keyword
as String) as String
- Returns all the messages in the
log that were associated with the given keyword.
- GetNamedFormat(formatName
as String) as String
- Retrieves the format string associated
with a name.
- GetXML(includeTimeStamps as
Boolean) as String
- Get the entire log formatted
as XML. Timestamp information can be included or excluded depending
on the value of the passed parameter.
- LeaveContext()
- Each call to EnterContext should
be paired with a call to LeaveContext.
- LogData(dataTag
as String, dataValue as String)
- Adds a data entry to the log.
Data entries are only accessible in XML format via the GetXML
and SaveXML methods.
-
- LogDataLong(dataTag
as String, dataValue as Long)
- Adds a data entry to the log.
Data entries are only accessible in XML format via the GetXML
and SaveXML methods.
- LogDebug(message
as String)
- Adds a debugging message to the
log.
- LogDebug2(message as String,
keyword as String)
- Adds a debugging message to the
log and associates a keyword with the log entry.
- LogDebug3(message as String,
keyword as String, formatName as String)
- Adds a debugging message to the
log and associates a keyword with the log entry. The message
is displayed according to the named format provided.
- LogError(message
as String)
- Adds an error message to the
log.
- LogError2(message as String,
keyword as String)
- Adds an error message to the
log and associates a keyword with the log entry.
- LogError3(message as String,
keyword as String, formatName as String)
- Adds an error message to the
log and associates a keyword with the log entry. The message
is displayed according to the named format provided.
- LogInfo(message
as String)
- Adds an informational message
to the log.
-
- LogInfo2(message as String,
keyword as String)
- Adds an informational message
to the log and associates a keyword with the log entry.
-
- LogInfo3(message as String,
keyword as String, formatName as String)
- Adds an informational message
to the log and associates a keyword with the log entry. The
message is displayed according to the named format provided.
-
- SaveXML(includeTimestamps
as Boolean, filename as String)
- Writes the log to an XML file.
- SetNamedFormat(formatName
as String, formatString as String)
- Defines a named format. This
allows a program to format some messages differently. For example,
if logging to HTML, you could create a format named "Important"
that displays the message in boldface and colored red.
|
|
Privacy
Statement. Copyright 2000-2008 Chilkat
Software, Inc. All rights reserved.
Send feedback to support@chilkatsoft.com Components for Microsoft Windows XP, 2000, 2003 Server, Vista, and Windows 95/98/NT4.
|
|