org.openmrs.annotation
Annotation Type Logging


@Target(value={METHOD,TYPE})
@Retention(value=RUNTIME)
@Inherited
@Documented
public @interface Logging

Annotation used to provide a few extra options to the API logging advice. This annotation is only needed if a specific method needs some extra information (like if you want to limit the output of this method when being logged because of size concerns or security concerns).

To use, simply place the annotation before a method declaration in its interface:

    @Logging(ignoreAllArgumentValues=true)
    public SomeString setSomeLargeString(String aVeryLargeString);
    
    @Logging(ignoreAllArgumentValues=true)
    public User saveUser(User userToSave, String password);
    
    @Logging(ignoredArgumentIndexes={1})
    public User saveUser(User userToSave, String password);
  

See Also:
LoggingAdvice

Optional Element Summary
 boolean ignoreAllArgumentValues
          If set to true, the annotated method will not print out the contents of the arguments every time this method is accessed and logged.
 int[] ignoredArgumentIndexes
          This list should set the argument indexes that should not be printed.
 

ignoreAllArgumentValues

public abstract boolean ignoreAllArgumentValues
If set to true, the annotated method will not print out the contents of the arguments every time this method is accessed and logged. Defaults to false

Returns:
boolean true/false to ignore the argument content when logging
Default:
false

ignoredArgumentIndexes

public abstract int[] ignoredArgumentIndexes
This list should set the argument indexes that should not be printed. This is useful if one of the arguments/parameters is more sensitive than others. Note: This parameter does not need defined if the Logging annotation has set ignoreAllArgumentValues() to true

Returns:
list of argument indexes to ignore. (first argument is 0, second is 1, etc)
Default:
{}

OpenMRS-1.7.x

Generated Apr 27 2012 10:06 PM. NOTE - these libraries are in active development and subject to change