Class AccessLogService
java.lang.Object
fr.paris.lutece.portal.service.security.AccessLogService
Access Log service
- Report all actions regarding authentication, user or rights management. - All messages should contain the application Id, the event type, a specific
application event code, the logged user, and specific contextual data. - The logger should implement the interface IAccessLogger of lutece core
Use "debug" or "trace" level for fine access control history, use "info" level otherwise
By default : - Lutece authentication, user and rights management are logged at INFO level, - action requests at DEBUG level, - views requests are logged at
TRACE level.
To log specific actions, use :
AccessLogService.getInstance( ).warn( String strEventType, String strAppEventCode, String strConnectedUserLogin, Object data ); AccessLogService.getInstance(
).info( String strEventType, String strAppEventCode, String strConnectedUserLogin, Object data ); AccessLogService.getInstance( ).debug( String strEventType,
String strAppEventCode, String strConnectedUserLogin, Object data ); AccessLogService.getInstance( ).trace( String strEventType, String strAppEventCode,
String strConnectedUserLogin, Object data );
Event types are available in AccessLoggerConstants class.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoiddebug(String strEventType, String strAppEventCode, fr.paris.lutece.api.user.User connectedUser, Object data) Log action with Debug levelvoiddebug(String strEventType, String strAppEventCode, fr.paris.lutece.api.user.User connectedUser, Object data, String specificOrigin) Log action with Debug levelstatic AccessLogServiceGet the unique instance of the Servicevoidinfo(String strEventType, String strAppEventCode, fr.paris.lutece.api.user.User connectedUser, Object data) Log action with info levelvoidinfo(String strEventType, String strAppEventCode, fr.paris.lutece.api.user.User connectedUser, Object data, String specificOrigin) Log action with info levelvoidtrace(String strEventType, String strAppEventCode, fr.paris.lutece.api.user.User connectedUser, Object data) Log action with trace levelvoidtrace(String strEventType, String strAppEventCode, fr.paris.lutece.api.user.User connectedUser, Object data, String specificOrigin) Log action with trace levelvoidwarn(String strEventType, String strAppEventCode, fr.paris.lutece.api.user.User connectedUser, Object data) Log action with warn levelvoidwarn(String strEventType, String strAppEventCode, fr.paris.lutece.api.user.User connectedUser, Object data, String specificOrigin) Log action with warn level
-
Field Details
-
ACCESS_LOG_FO
- See Also:
-
ACCESS_LOG_BO
- See Also:
-
-
Method Details
-
getInstance
Get the unique instance of the Service- Returns:
- The instance
-
info
public void info(String strEventType, String strAppEventCode, fr.paris.lutece.api.user.User connectedUser, Object data, String specificOrigin) Log action with info level- Parameters:
strEventType- the event typestrAppEventCode- the event codeconnectedUser- the user connecteddata- the message object to logspecificOrigin- specific origin of the event to log
-
info
public void info(String strEventType, String strAppEventCode, fr.paris.lutece.api.user.User connectedUser, Object data) Log action with info level- Parameters:
strEventType- the event typestrAppEventCode- the event codeconnectedUser- the user connecteddata- the message object to log
-
debug
public void debug(String strEventType, String strAppEventCode, fr.paris.lutece.api.user.User connectedUser, Object data, String specificOrigin) Log action with Debug level- Parameters:
strEventType-strAppEventCode-connectedUser-data-specificOrigin-
-
debug
public void debug(String strEventType, String strAppEventCode, fr.paris.lutece.api.user.User connectedUser, Object data) Log action with Debug level- Parameters:
strEventType-strAppEventCode-connectedUser-data-
-
trace
public void trace(String strEventType, String strAppEventCode, fr.paris.lutece.api.user.User connectedUser, Object data, String specificOrigin) Log action with trace level- Parameters:
strEventType-strAppEventCode-connectedUser-data-specificOrigin-
-
trace
public void trace(String strEventType, String strAppEventCode, fr.paris.lutece.api.user.User connectedUser, Object data) Log action with trace level- Parameters:
strEventType-strAppEventCode-connectedUser-data-
-
warn
public void warn(String strEventType, String strAppEventCode, fr.paris.lutece.api.user.User connectedUser, Object data, String specificOrigin) Log action with warn level- Parameters:
strEventType-strAppEventCode-connectedUser-data-specificOrigin-
-
warn
public void warn(String strEventType, String strAppEventCode, fr.paris.lutece.api.user.User connectedUser, Object data) Log action with warn level- Parameters:
strEventType-strAppEventCode-connectedUser-data-
-