FuseGuard Logo

fuseguard.components.loggers
Component DBLogger

loggers.BaseLogger
  |
  +--loggers.DBLogger

Logs to a database using the cfquery tag.

Method Summary
public any init([any firewallInstance])
public string getDatasourceName()
          Returns the name of the datasource passed into setDatasource
public string getDatasourceType()
          Returns the database type passed into setDatasource
public BaseLogReader getLogReader()
          I return the log reader
public string getStorageDescription()
          Returns a description of where the data is stored, eg datasource name.
public boolean hasLogReader()
          If this logger has an associated log reader, return true
public boolean isPurgeable()
          Tells if the logger is purgeable by calling purgeLogs
public boolean isViewable()
          If the log is viewable such as a file or DB return true, if not (email, or IM) return false.
public void logRequest(numeric level, [any filter], [variablename type="inspectRequest"], [string message=""], [string detail=""])
public void purgeLogs([any days="0"])
          Purges or deletes logs older the the specified number of days
public void setDatasource(any datasource, [any username=""], [any password=""], [any dbtype=""])
          Sets the datasource name.

Methods inherited from loggers.BaseLogger
logOnlyBlocked, setLogOnlyBlocked, setEscapeMessage, getDescription, getConfigurables, escapesMessage, getName, setVerbose, isVerbose
 

Method Detail

getDatasourceName

public string getDatasourceName()
Returns the name of the datasource passed into setDatasource


getDatasourceType

public string getDatasourceType()
Returns the database type passed into setDatasource


getLogReader

public BaseLogReader getLogReader()
I return the log reader


getStorageDescription

public string getStorageDescription()
Returns a description of where the data is stored, eg datasource name.


hasLogReader

public boolean hasLogReader()
If this logger has an associated log reader, return true


init

public any init([any firewallInstance])
Parameters:
[any firewallInstance]

isPurgeable

public boolean isPurgeable()
Tells if the logger is purgeable by calling purgeLogs


isViewable

public boolean isViewable()
If the log is viewable such as a file or DB return true, if not (email, or IM) return false.


logRequest

public void logRequest(numeric level, [any filter], [variablename type="inspectRequest"], [string message=""], [string detail=""])
Parameters:
numeric level
[any filter] - a Filter object
[variablename type="inspectRequest"]
[string message=""]
[string detail=""]

purgeLogs

public void purgeLogs([any days="0"])
Purges or deletes logs older the the specified number of days

Parameters:
[any days="0"]

setDatasource

public void setDatasource(any datasource, [any username=""], [any password=""], [any dbtype=""])
Sets the datasource name.

Parameters:
any datasource - The name of a valid datasource
[any username=""] - Optional, the datasource username
[any password=""] - Optional, the datasource password
[any dbtype=""] - mysql, sqlserver, or derby