// path, username, groupname, tagline
private final MessageFormat deldir = new MessageFormat("DELDIR: \"{0}\" \"{1}\" \"{2}\" \"{3}\"");
public void handleEvent(Event event) {
String path = event.getProperty("file.path.real");
User user = event.getUser();
// we always log these events, so we don't need to check for permission
if (event.getType() == Event.CREATE_DIRECTORY) {
Logging.getEventLog().log(newdir.format(new Object[] {path, user.getUsername(), user.getPrimaryGroup(), user.getTagline()}));
} else if (event.getType() == Event.REMOVE_DIRECTORY) {
Logging.getEventLog().log(deldir.format(new Object[] {path, user.getUsername(), user.getPrimaryGroup(), user.getTagline()}));
}
}