TZSQLMonitor Class Reference

Implements an object to log events from SQL client. More...

Inheritance diagram for TZSQLMonitor:

TComponent

List of all members.

Public Member Functions

 LogEvent (TZLoggingEvent Event)
 Handles a new incoming logging event.
 Save ()
 Saves the logging events into predefined file set in FileName property.
 SaveToFile (const string FileName)
 Saves the logging events to the specified file.
 TZSQLMonitor (TComponent AOwner)
 Constructs this object and assignes main properties.
 ~TZSQLMonitor ()
 Destroys this object and cleanups the memory.

Public Attributes

Boolean Active
Boolean AutoSave
string FileName
Integer MaxTraceCount
TZTraceLogEvent OnLogTrace
TZTraceEvent OnTrace
Integer TraceCount
TZLoggingEvent TraceList

Private Member Functions

 DoLogTrace (TZLoggingEvent Event)
 Invokes an event listener after logging event.
 DoTrace (TZLoggingEvent Event, Boolean &LogTrace)
 Invokes an event listener before logging event.
Integer GetTraceCount ()
 Gets a number of stored logging events.
TZLoggingEvent GetTraceItem (Integer Index)
 Gets a logging event by it's index.
 SetActive (const Boolean Value)
 Sets an active state for this monitor.
 SetMaxTraceCount (const Integer Value)
 Sets a new number of logging events in the storage.
 TruncateTraceList (Integer Count)
 Truncates a storage of logging events to the specified limit.

Private Attributes

Boolean FActive
Boolean FAutoSave
string FFileName
Integer FMaxTraceCount
TZTraceLogEvent FOnLogTrace
TZTraceEvent FOnTrace
TObjectList FTraceList


Detailed Description

Implements an object to log events from SQL client.

Definition at line 83 of file ZSqlMonitor.pas.


Constructor & Destructor Documentation

TZSQLMonitor::TZSQLMonitor ( TComponent  AOwner  ) 

Constructs this object and assignes main properties.

Parameters:
AOwner a component owner.

Definition at line 191 of file ZSqlMonitor.pas.

TZSQLMonitor::~TZSQLMonitor (  ) 

Destroys this object and cleanups the memory.

Definition at line 205 of file ZSqlMonitor.pas.


Member Function Documentation

TZSQLMonitor::DoLogTrace ( TZLoggingEvent  Event  )  [private]

Invokes an event listener after logging event.

Parameters:
Event a logging event object.

Definition at line 294 of file ZSqlMonitor.pas.

TZSQLMonitor::DoTrace ( TZLoggingEvent  Event,
Boolean &  LogTrace 
) [private]

Invokes an event listener before logging event.

Parameters:
Event a logging event object.
LogTrace a flag which switches storing the event.

Definition at line 309 of file ZSqlMonitor.pas.

Integer TZSQLMonitor::GetTraceCount (  )  [private]

Gets a number of stored logging events.

Returns:
a number of stored logging events.

Definition at line 219 of file ZSqlMonitor.pas.

TZLoggingEvent TZSQLMonitor::GetTraceItem ( Integer  Index  )  [private]

Gets a logging event by it's index.

Parameters:
Index an event index. a requested event object.

Definition at line 232 of file ZSqlMonitor.pas.

TZSQLMonitor::LogEvent ( TZLoggingEvent  Event  ) 

Handles a new incoming logging event.

Parameters:
Event an incoming logging event.

Definition at line 370 of file ZSqlMonitor.pas.

TZSQLMonitor::Save (  ) 

Saves the logging events into predefined file set in FileName property.

Definition at line 324 of file ZSqlMonitor.pas.

TZSQLMonitor::SaveToFile ( const string  FileName  ) 

Saves the logging events to the specified file.

Parameters:
FileName a name of the file to write the events.

Definition at line 336 of file ZSqlMonitor.pas.

TZSQLMonitor::SetActive ( const Boolean  Value  )  [private]

Sets an active state for this monitor.

Parameters:
Value True to activate this monitor and False to deactivate it.

Definition at line 246 of file ZSqlMonitor.pas.

TZSQLMonitor::SetMaxTraceCount ( const Integer  Value  )  [private]

Sets a new number of logging events in the storage.

Parameters:
Value a new number of logging events.

Definition at line 265 of file ZSqlMonitor.pas.

TZSQLMonitor::TruncateTraceList ( Integer  Count  )  [private]

Truncates a storage of logging events to the specified limit.

Parameters:
Count a number of events in the storage.

Definition at line 280 of file ZSqlMonitor.pas.


Member Data Documentation

See also:
FActive For reading

SetActive For writing

Definition at line 161 of file ZSqlMonitor.pas.

See also:
FAutoSave For reading

FAutoSave For writing

Definition at line 164 of file ZSqlMonitor.pas.

Boolean TZSQLMonitor::FActive [private]

Definition at line 88 of file ZSqlMonitor.pas.

Boolean TZSQLMonitor::FAutoSave [private]

Definition at line 90 of file ZSqlMonitor.pas.

string TZSQLMonitor::FFileName [private]

Definition at line 92 of file ZSqlMonitor.pas.

See also:
FFileName For reading

FFileName For writing

Definition at line 167 of file ZSqlMonitor.pas.

Integer TZSQLMonitor::FMaxTraceCount [private]

Definition at line 94 of file ZSqlMonitor.pas.

Definition at line 100 of file ZSqlMonitor.pas.

TZTraceEvent TZSQLMonitor::FOnTrace [private]

Definition at line 98 of file ZSqlMonitor.pas.

TObjectList TZSQLMonitor::FTraceList [private]

Definition at line 96 of file ZSqlMonitor.pas.

See also:
FMaxTraceCount For reading

SetMaxTraceCount For writing

Definition at line 170 of file ZSqlMonitor.pas.

See also:
FOnLogTrace For reading

FOnLogTrace For writing

Definition at line 177 of file ZSqlMonitor.pas.

TZTraceEvent TZSQLMonitor::OnTrace

See also:
FOnTrace For reading

FOnTrace For writing

Definition at line 174 of file ZSqlMonitor.pas.

See also:
GetTraceCount For reading

Definition at line 154 of file ZSqlMonitor.pas.

See also:
GetTraceItem For reading

Definition at line 157 of file ZSqlMonitor.pas.


The documentation for this class was generated from the following file:

Generated on Wed Dec 30 08:42:57 2009 for zeoslib by  doxygen 1.5.7.1