HDIV API 2.0.4

org.hdiv.logs
Class Logger

java.lang.Object
  extended by org.hdiv.logs.Logger

public class Logger
extends java.lang.Object

Log that shows the attacks detected by HDIV. It includes type of attack and the identity (application user) of the user. Since the way to obtain this user may vary from application to application, an standard interface has been defined to be implemented by each application.

Log format = type;target;parameter;value;userLocalIP;ip;userId

Author:
Roberto Velasco
See Also:
IUserData

Constructor Summary
Logger()
           
 
Method Summary
 java.lang.String format(java.lang.String type, java.lang.String target, java.lang.String parameter, java.lang.String value)
           String formateado con la información del ataque producido por el usuario.
 IUserData getUserData()
           
 void init(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpSession session)
          Logger is initialized with http request and user web session.
 void log(java.lang.String type, java.lang.String target, java.lang.String parameter, java.lang.String value)
          Imprime el ataque formateado producido por el usuario siempre y cuando el nivel de logueo definido en la aplicación web sea como mínimo de tipo INFO.
 void setUserData(IUserData userData)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Logger

public Logger()
Method Detail

init

public void init(javax.servlet.http.HttpServletRequest request,
                 javax.servlet.http.HttpSession session)
Logger is initialized with http request and user web session.

Parameters:
request - HTTP request
session - HTTP session

log

public void log(java.lang.String type,
                java.lang.String target,
                java.lang.String parameter,
                java.lang.String value)
Imprime el ataque formateado producido por el usuario siempre y cuando el nivel de logueo definido en la aplicación web sea como mínimo de tipo INFO.

Parameters:
type - Error type
target - target name
parameter - parameter name
value - parameter value

format

public java.lang.String format(java.lang.String type,
                               java.lang.String target,
                               java.lang.String parameter,
                               java.lang.String value)

String formateado con la información del ataque producido por el usuario. El formato del log es el siguiente:

[error type];[target];[parameter];[value];[user local IP adress];[IP adress of the client or the last proxy that sent the request];[userId]

Parameters:
type - Error type
target - target name
parameter - parameter name
value - parameter value
Returns:
String formateado con la información del ataque producido por el usuario.

getUserData

public IUserData getUserData()

setUserData

public void setUserData(IUserData userData)

HDIV 2.0.4

Copyright © 2008 hdiv.org. All Rights Reserved.