syncope-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ilgro...@apache.org
Subject [2/4] syncope git commit: [SYNCOPE-882] Initial commit: support in common, core and cli with new log4j MemoryAppend which retains in memory the last N statements
Date Tue, 03 Jan 2017 15:00:08 GMT
[SYNCOPE-882] Initial commit: support in common, core and cli with new log4j MemoryAppend which retains in memory the last N statements


Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/d731806c
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/d731806c
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/d731806c

Branch: refs/heads/2_0_X
Commit: d731806ca690bf0e1221f6fd0e0daa5a66cc8c62
Parents: 06effb2
Author: Francesco Chicchiriccò <ilgrosso@apache.org>
Authored: Tue Jan 3 15:59:33 2017 +0100
Committer: Francesco Chicchiriccò <ilgrosso@apache.org>
Committed: Tue Jan 3 15:59:33 2017 +0100

----------------------------------------------------------------------
 .../cli/commands/CommonsResultManager.java      |   3 +-
 .../configuration/ConfigurationGet.java         |   3 +-
 .../configuration/ConfigurationRead.java        |   5 +-
 .../ConfigurationResultManager.java             |  12 +--
 .../configuration/ConfigurationUpdate.java      |   5 +-
 .../cli/commands/logger/LoggerCommand.java      |  10 +-
 .../cli/commands/logger/LoggerCreate.java       |   7 +-
 .../cli/commands/logger/LoggerDetails.java      |   2 +-
 .../commands/logger/LoggerLastStatements.java   |  54 ++++++++++
 .../client/cli/commands/logger/LoggerList.java  |   3 +-
 .../logger/LoggerListMemoryAppenders.java       |  50 +++++++++
 .../client/cli/commands/logger/LoggerRead.java  |   7 +-
 .../commands/logger/LoggerResultManager.java    |  43 ++++++--
 .../logger/LoggerSyncopeOperations.java         |  24 ++++-
 .../cli/commands/logger/LoggerUpdate.java       |   7 +-
 .../cli/commands/logger/LoggerUpdateAll.java    |   7 +-
 .../client/cli/commands/policy/PolicyList.java  |   9 +-
 .../client/cli/commands/policy/PolicyRead.java  |   5 +-
 .../commands/policy/PolicyResultManager.java    |   6 +-
 .../client/cli/commands/schema/SchemaList.java  |   9 +-
 .../cli/commands/schema/SchemaListAll.java      |   8 +-
 .../cli/commands/schema/SchemaListDerived.java  |   8 +-
 .../cli/commands/schema/SchemaListPlain.java    |   8 +-
 .../cli/commands/schema/SchemaListVirtual.java  |   8 +-
 .../client/cli/commands/schema/SchemaRead.java  |   5 +-
 .../commands/schema/SchemaResultManager.java    |  24 ++---
 .../client/cli/commands/task/TaskList.java      |   9 +-
 .../client/cli/commands/task/TaskRead.java      |   5 +-
 .../cli/commands/task/TaskResultManager.java    |   5 +-
 .../client/cli/commands/user/UserList.java      |   3 +-
 .../cli/commands/user/UserResultManager.java    |   3 +-
 .../apache/syncope/client/cli/view/Table.java   |  21 ++--
 .../console/events/EventCategoryPanel.java      |  10 +-
 .../console/events/EventSelectionPanel.java     |   2 +-
 .../syncope/client/console/pages/Audit.java     |   2 +-
 .../console/panels/AbstractLogsPanel.java       |   2 +-
 .../client/console/panels/ConsoleLogPanel.java  |   2 +-
 .../client/console/panels/CoreLogPanel.java     |   2 +-
 .../client/console/rest/LoggerRestClient.java   |  12 +--
 .../syncope/common/lib/log/EventCategoryTO.java |  92 ++++++++++++++++
 .../syncope/common/lib/log/LogAppender.java     |  37 +++++++
 .../syncope/common/lib/log/LogStatementTO.java  | 108 +++++++++++++++++++
 .../apache/syncope/common/lib/log/LoggerTO.java |  53 +++++++++
 .../syncope/common/lib/log/package-info.java    |  27 +++++
 .../syncope/common/lib/to/EventCategoryTO.java  |  92 ----------------
 .../apache/syncope/common/lib/to/LoggerTO.java  |  53 ---------
 .../common/lib/types/AuditLoggerName.java       |   2 +-
 .../syncope/common/rest/api/LoggerWrapper.java  |   2 +-
 .../common/rest/api/service/LoggerService.java  |  30 +++++-
 .../apache/syncope/core/logic/LoggerLogic.java  |  38 ++++++-
 .../syncope/core/logic/MemoryAppender.java      |  95 ++++++++++++++++
 .../syncope/core/logic/init/LoggerLoader.java   |  14 +++
 .../rest/cxf/service/LoggerServiceImpl.java     |  17 ++-
 .../src/main/resources/log4j2.xml               |  22 ++++
 .../org/apache/syncope/fit/cli/CLIITCase.java   |  21 ++++
 .../apache/syncope/fit/console/LogsITCase.java  |   2 +-
 .../apache/syncope/fit/core/LoggerITCase.java   |  32 +++++-
 .../apache/syncope/fit/core/ReportITCase.java   |   2 +-
 58 files changed, 846 insertions(+), 303 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/syncope/blob/d731806c/client/cli/src/main/java/org/apache/syncope/client/cli/commands/CommonsResultManager.java
----------------------------------------------------------------------
diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/CommonsResultManager.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/CommonsResultManager.java
index 711b284..6631dea 100644
--- a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/CommonsResultManager.java
+++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/CommonsResultManager.java
@@ -19,7 +19,6 @@
 package org.apache.syncope.client.cli.commands;
 
 import java.util.Arrays;
-import java.util.LinkedList;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
@@ -93,7 +92,7 @@ public abstract class CommonsResultManager {
     protected void printDetails(final String title, final Map<String, String> details) {
         final Table.TableBuilder tableBuilder = new Table.TableBuilder(title).header("detail").header("value");
         for (final Map.Entry<String, String> entrySet : details.entrySet()) {
-            tableBuilder.rowValues(new LinkedList<>(Arrays.asList(entrySet.getKey(), entrySet.getValue())));
+            tableBuilder.rowValues(Arrays.asList(entrySet.getKey(), entrySet.getValue()));
         }
         tableBuilder.build().print();
     }

http://git-wip-us.apache.org/repos/asf/syncope/blob/d731806c/client/cli/src/main/java/org/apache/syncope/client/cli/commands/configuration/ConfigurationGet.java
----------------------------------------------------------------------
diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/configuration/ConfigurationGet.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/configuration/ConfigurationGet.java
index 300cd17..af620e2 100644
--- a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/configuration/ConfigurationGet.java
+++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/configuration/ConfigurationGet.java
@@ -18,7 +18,6 @@
  */
 package org.apache.syncope.client.cli.commands.configuration;
 
-import java.util.LinkedList;
 import org.apache.syncope.client.cli.Input;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -38,7 +37,7 @@ public class ConfigurationGet extends AbstractConfigurationCommand {
     public void get() {
         if (input.parameterNumber() == 0) {
             try {
-                configurationResultManager.fromGet(new LinkedList<>(configurationSyncopeOperations.list()));
+                configurationResultManager.fromGet(configurationSyncopeOperations.list());
             } catch (final Exception ex) {
                 LOG.error("Error getting configuration", ex);
                 configurationResultManager.genericError(ex.getMessage());

http://git-wip-us.apache.org/repos/asf/syncope/blob/d731806c/client/cli/src/main/java/org/apache/syncope/client/cli/commands/configuration/ConfigurationRead.java
----------------------------------------------------------------------
diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/configuration/ConfigurationRead.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/configuration/ConfigurationRead.java
index 0ad21c7..ac68977 100644
--- a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/configuration/ConfigurationRead.java
+++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/configuration/ConfigurationRead.java
@@ -18,7 +18,8 @@
  */
 package org.apache.syncope.client.cli.commands.configuration;
 
-import java.util.LinkedList;
+import java.util.ArrayList;
+import java.util.List;
 import javax.xml.ws.WebServiceException;
 import org.apache.syncope.client.cli.Input;
 import org.apache.syncope.common.lib.SyncopeClientException;
@@ -40,7 +41,7 @@ public class ConfigurationRead extends AbstractConfigurationCommand {
 
     public void read() {
         if (input.parameterNumber() >= 1) {
-            final LinkedList<AttrTO> attrList = new LinkedList<>();
+            final List<AttrTO> attrList = new ArrayList<>();
             boolean failed = false;
             for (final String parameter : input.getParameters()) {
                 try {

http://git-wip-us.apache.org/repos/asf/syncope/blob/d731806c/client/cli/src/main/java/org/apache/syncope/client/cli/commands/configuration/ConfigurationResultManager.java
----------------------------------------------------------------------
diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/configuration/ConfigurationResultManager.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/configuration/ConfigurationResultManager.java
index 661a542..696d2cb 100644
--- a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/configuration/ConfigurationResultManager.java
+++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/configuration/ConfigurationResultManager.java
@@ -19,32 +19,32 @@
 package org.apache.syncope.client.cli.commands.configuration;
 
 import java.util.Arrays;
-import java.util.LinkedList;
+import java.util.List;
 import org.apache.syncope.client.cli.commands.CommonsResultManager;
 import org.apache.syncope.client.cli.view.Table;
 import org.apache.syncope.common.lib.to.AttrTO;
 
 public class ConfigurationResultManager extends CommonsResultManager {
 
-    public void fromGet(final LinkedList<AttrTO> attrTOs) {
+    public void fromGet(final List<AttrTO> attrTOs) {
         fromCommandToView("syncope configuration", attrTOs);
     }
 
-    public void fromRead(final LinkedList<AttrTO> attrTOs) {
+    public void fromRead(final List<AttrTO> attrTOs) {
         fromCommandToView("selected conf attributes", attrTOs);
     }
 
-    public void fromUpdate(final LinkedList<AttrTO> attrTOs) {
+    public void fromUpdate(final List<AttrTO> attrTOs) {
         fromCommandToView("updated conf attributes", attrTOs);
     }
 
-    private void fromCommandToView(final String title, final LinkedList<AttrTO> attrTOs) {
+    private void fromCommandToView(final String title, final List<AttrTO> attrTOs) {
         final Table.TableBuilder tableBuilder = new Table.TableBuilder(title).header("attribute").header("value");
         for (final AttrTO attrTO : attrTOs) {
             String attrValue = attrTO.getValues().toString();
             attrValue = attrValue.substring(0, attrValue.length() - 1);
             attrValue = attrValue.substring(1, attrValue.length());
-            tableBuilder.rowValues(new LinkedList<>(Arrays.asList(attrTO.getSchema(), attrValue)));
+            tableBuilder.rowValues(Arrays.asList(attrTO.getSchema(), attrValue));
         }
         tableBuilder.build().print();
     }

http://git-wip-us.apache.org/repos/asf/syncope/blob/d731806c/client/cli/src/main/java/org/apache/syncope/client/cli/commands/configuration/ConfigurationUpdate.java
----------------------------------------------------------------------
diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/configuration/ConfigurationUpdate.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/configuration/ConfigurationUpdate.java
index 91ef4c6..cd3e268 100644
--- a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/configuration/ConfigurationUpdate.java
+++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/configuration/ConfigurationUpdate.java
@@ -18,7 +18,8 @@
  */
 package org.apache.syncope.client.cli.commands.configuration;
 
-import java.util.LinkedList;
+import java.util.ArrayList;
+import java.util.List;
 import javax.xml.ws.WebServiceException;
 import org.apache.commons.lang3.tuple.Pair;
 import org.apache.syncope.client.cli.Input;
@@ -42,7 +43,7 @@ public class ConfigurationUpdate extends AbstractConfigurationCommand {
 
     public void update() {
         if (input.parameterNumber() >= 1) {
-            LinkedList<AttrTO> attrList = new LinkedList<>();
+            List<AttrTO> attrList = new ArrayList<>();
             boolean failed = false;
             for (String parameter : input.getParameters()) {
                 Pair<String, String> pairParameter = Input.toPairParameter(parameter);

http://git-wip-us.apache.org/repos/asf/syncope/blob/d731806c/client/cli/src/main/java/org/apache/syncope/client/cli/commands/logger/LoggerCommand.java
----------------------------------------------------------------------
diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/logger/LoggerCommand.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/logger/LoggerCommand.java
index 7452726..9161571 100644
--- a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/logger/LoggerCommand.java
+++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/logger/LoggerCommand.java
@@ -43,6 +43,12 @@ public class LoggerCommand extends AbstractCommand {
             case LIST:
                 new LoggerList(input).list();
                 break;
+            case LIST_MEMORY_APPENDERS:
+                new LoggerListMemoryAppenders(input).list();
+                break;
+            case LAST_STATEMENTS:
+                new LoggerLastStatements(input).read();
+                break;
             case READ:
                 new LoggerRead(input).read();
                 break;
@@ -71,10 +77,12 @@ public class LoggerCommand extends AbstractCommand {
         return loggerResultManager.commandHelpMessage(getClass());
     }
 
-    private enum LoggerOptions {
+    public enum LoggerOptions {
 
         HELP("--help"),
         DETAILS("--details"),
+        LIST_MEMORY_APPENDERS("--list-memory-appenders"),
+        LAST_STATEMENTS("--last-statements"),
         LIST("--list"),
         READ("--read"),
         UPDATE("--update"),

http://git-wip-us.apache.org/repos/asf/syncope/blob/d731806c/client/cli/src/main/java/org/apache/syncope/client/cli/commands/logger/LoggerCreate.java
----------------------------------------------------------------------
diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/logger/LoggerCreate.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/logger/LoggerCreate.java
index 38e97d8..7c95633 100644
--- a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/logger/LoggerCreate.java
+++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/logger/LoggerCreate.java
@@ -18,13 +18,14 @@
  */
 package org.apache.syncope.client.cli.commands.logger;
 
-import java.util.LinkedList;
+import java.util.ArrayList;
+import java.util.List;
 import javax.xml.ws.WebServiceException;
 import org.apache.commons.lang3.tuple.Pair;
 import org.apache.syncope.client.cli.Input;
 import org.apache.syncope.client.cli.util.CommandUtils;
 import org.apache.syncope.common.lib.SyncopeClientException;
-import org.apache.syncope.common.lib.to.LoggerTO;
+import org.apache.syncope.common.lib.log.LoggerTO;
 import org.apache.syncope.common.lib.types.LoggerLevel;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -44,7 +45,7 @@ public class LoggerCreate extends AbstractLoggerCommand {
 
     public void create() {
         if (input.parameterNumber() >= 1) {
-            final LinkedList<LoggerTO> loggerTOs = new LinkedList<>();
+            final List<LoggerTO> loggerTOs = new ArrayList<>();
             boolean failed = false;
             for (String parameter : input.getParameters()) {
                 LoggerTO loggerTO = new LoggerTO();

http://git-wip-us.apache.org/repos/asf/syncope/blob/d731806c/client/cli/src/main/java/org/apache/syncope/client/cli/commands/logger/LoggerDetails.java
----------------------------------------------------------------------
diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/logger/LoggerDetails.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/logger/LoggerDetails.java
index f10e4ea..a14cf7b 100644
--- a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/logger/LoggerDetails.java
+++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/logger/LoggerDetails.java
@@ -23,7 +23,7 @@ import java.util.Map;
 import org.apache.commons.collections4.map.LinkedMap;
 import org.apache.syncope.client.cli.Input;
 import org.apache.syncope.common.lib.SyncopeClientException;
-import org.apache.syncope.common.lib.to.LoggerTO;
+import org.apache.syncope.common.lib.log.LoggerTO;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 

http://git-wip-us.apache.org/repos/asf/syncope/blob/d731806c/client/cli/src/main/java/org/apache/syncope/client/cli/commands/logger/LoggerLastStatements.java
----------------------------------------------------------------------
diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/logger/LoggerLastStatements.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/logger/LoggerLastStatements.java
new file mode 100644
index 0000000..62fd2e1
--- /dev/null
+++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/logger/LoggerLastStatements.java
@@ -0,0 +1,54 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.client.cli.commands.logger;
+
+import org.apache.syncope.client.cli.Input;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class LoggerLastStatements extends AbstractLoggerCommand {
+
+    private static final Logger LOG = LoggerFactory.getLogger(LoggerLastStatements.class);
+
+    private static final String READ_HELP_MESSAGE = "logger --last-statements {APPENDER-NAME}";
+
+    private final Input input;
+
+    public LoggerLastStatements(final Input input) {
+        this.input = input;
+    }
+
+    public void read() {
+        if (input.getParameters().length == 1) {
+            try {
+                loggerResultManager.fromGetLastLogStatements(
+                        loggerSyncopeOperations.getLastLogStatements(input.getParameters()[0]));
+            } catch (final Exception ex) {
+                LOG.error("Error reading last statements", ex);
+                if (ex.getMessage().startsWith("NotFound")) {
+                    loggerResultManager.notFoundError("Memory appender", input.getParameters()[0]);
+                } else {
+                    loggerResultManager.genericError(ex.getMessage());
+                }
+            }
+        } else {
+            loggerResultManager.commandOptionError(READ_HELP_MESSAGE);
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/d731806c/client/cli/src/main/java/org/apache/syncope/client/cli/commands/logger/LoggerList.java
----------------------------------------------------------------------
diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/logger/LoggerList.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/logger/LoggerList.java
index 6f936fb..28bf679 100644
--- a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/logger/LoggerList.java
+++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/logger/LoggerList.java
@@ -18,7 +18,6 @@
  */
 package org.apache.syncope.client.cli.commands.logger;
 
-import java.util.LinkedList;
 import org.apache.syncope.client.cli.Input;
 import org.apache.syncope.common.lib.SyncopeClientException;
 import org.slf4j.Logger;
@@ -39,7 +38,7 @@ public class LoggerList extends AbstractLoggerCommand {
     public void list() {
         if (input.parameterNumber() == 0) {
             try {
-                loggerResultManager.fromList(new LinkedList<>(loggerSyncopeOperations.list()));
+                loggerResultManager.fromList(loggerSyncopeOperations.list());
             } catch (final SyncopeClientException ex) {
                 LOG.error("Error listing logger", ex);
                 loggerResultManager.genericError(ex.getMessage());

http://git-wip-us.apache.org/repos/asf/syncope/blob/d731806c/client/cli/src/main/java/org/apache/syncope/client/cli/commands/logger/LoggerListMemoryAppenders.java
----------------------------------------------------------------------
diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/logger/LoggerListMemoryAppenders.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/logger/LoggerListMemoryAppenders.java
new file mode 100644
index 0000000..e39b03a
--- /dev/null
+++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/logger/LoggerListMemoryAppenders.java
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.client.cli.commands.logger;
+
+import org.apache.syncope.client.cli.Input;
+import org.apache.syncope.common.lib.SyncopeClientException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class LoggerListMemoryAppenders extends AbstractLoggerCommand {
+
+    private static final Logger LOG = LoggerFactory.getLogger(LoggerListMemoryAppenders.class);
+
+    private static final String LIST_HELP_MESSAGE = "logger --list-memory-appenders";
+
+    private final Input input;
+
+    public LoggerListMemoryAppenders(final Input input) {
+        this.input = input;
+    }
+
+    public void list() {
+        if (input.parameterNumber() == 0) {
+            try {
+                loggerResultManager.fromListMemoryAppenders(loggerSyncopeOperations.listMemoryAppenders());
+            } catch (final SyncopeClientException ex) {
+                LOG.error("Error listing memory appenders", ex);
+                loggerResultManager.genericError(ex.getMessage());
+            }
+        } else {
+            loggerResultManager.unnecessaryParameters(input.listParameters(), LIST_HELP_MESSAGE);
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/d731806c/client/cli/src/main/java/org/apache/syncope/client/cli/commands/logger/LoggerRead.java
----------------------------------------------------------------------
diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/logger/LoggerRead.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/logger/LoggerRead.java
index 6346522..af4ec24 100644
--- a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/logger/LoggerRead.java
+++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/logger/LoggerRead.java
@@ -18,11 +18,12 @@
  */
 package org.apache.syncope.client.cli.commands.logger;
 
-import java.util.LinkedList;
+import java.util.ArrayList;
+import java.util.List;
 import javax.xml.ws.WebServiceException;
 import org.apache.syncope.client.cli.Input;
 import org.apache.syncope.common.lib.SyncopeClientException;
-import org.apache.syncope.common.lib.to.LoggerTO;
+import org.apache.syncope.common.lib.log.LoggerTO;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -40,7 +41,7 @@ public class LoggerRead extends AbstractLoggerCommand {
 
     public void read() {
         if (input.getParameters().length >= 1) {
-            final LinkedList<LoggerTO> loggerTOs = new LinkedList<>();
+            final List<LoggerTO> loggerTOs = new ArrayList<>();
             boolean failed = false;
             for (final String parameter : input.getParameters()) {
                 try {

http://git-wip-us.apache.org/repos/asf/syncope/blob/d731806c/client/cli/src/main/java/org/apache/syncope/client/cli/commands/logger/LoggerResultManager.java
----------------------------------------------------------------------
diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/logger/LoggerResultManager.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/logger/LoggerResultManager.java
index baca859..62f9316 100644
--- a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/logger/LoggerResultManager.java
+++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/logger/LoggerResultManager.java
@@ -18,44 +18,67 @@
  */
 package org.apache.syncope.client.cli.commands.logger;
 
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
 import java.util.Arrays;
-import java.util.LinkedList;
+import java.util.Collections;
+import java.util.List;
 import java.util.Map;
+import java.util.Queue;
 import org.apache.syncope.client.cli.commands.CommonsResultManager;
 import org.apache.syncope.client.cli.view.Table;
-import org.apache.syncope.common.lib.to.LoggerTO;
+import org.apache.syncope.common.lib.log.LogStatementTO;
+import org.apache.syncope.common.lib.log.LoggerTO;
 
 public class LoggerResultManager extends CommonsResultManager {
 
-    public void fromList(final LinkedList<LoggerTO> loggerTOs) {
+    private static final ObjectMapper MAPPER = new ObjectMapper();
+
+    public void fromListMemoryAppenders(final List<String> memoryAppenders) {
+        final Table.TableBuilder tableBuilder = new Table.TableBuilder("list memory appenders").header("appender");
+        for (final String appender : memoryAppenders) {
+            tableBuilder.rowValues(Collections.singletonList(appender));
+        }
+        tableBuilder.build().print();
+    }
+
+    public void fromGetLastLogStatements(final Queue<LogStatementTO> statements) throws JsonProcessingException {
+        final Table.TableBuilder tableBuilder = new Table.TableBuilder("last statements").header("statement");
+        for (final LogStatementTO statement : statements) {
+            tableBuilder.rowValues(Collections.singletonList(
+                    MAPPER.writerWithDefaultPrettyPrinter().writeValueAsString(statement)));
+        }
+        tableBuilder.build().print();
+    }
+
+    public void fromList(final List<LoggerTO> loggerTOs) {
         fromCommandToView("list loggers", "level", loggerTOs);
     }
 
-    public void fromRead(final LinkedList<LoggerTO> loggerTOs) {
+    public void fromRead(final List<LoggerTO> loggerTOs) {
         fromCommandToView("read loggers", "level", loggerTOs);
     }
 
-    public void fromCreate(final LinkedList<LoggerTO> loggerTOs) {
+    public void fromCreate(final List<LoggerTO> loggerTOs) {
         fromCommandToView("created loggers", "level", loggerTOs);
     }
 
-    public void fromUpdate(final LinkedList<LoggerTO> loggerTOs) {
+    public void fromUpdate(final List<LoggerTO> loggerTOs) {
         fromCommandToView("updated loggers", "new level", loggerTOs);
     }
 
-    public void fromDelete(final LinkedList<LoggerTO> loggerTOs) {
+    public void fromDelete(final List<LoggerTO> loggerTOs) {
         fromCommandToView("deleted loggers", "new level", loggerTOs);
     }
 
     private void fromCommandToView(
             final String title,
             final String secondHeader,
-            final LinkedList<LoggerTO> loggerTOs) {
+            final List<LoggerTO> loggerTOs) {
 
         final Table.TableBuilder tableBuilder = new Table.TableBuilder(title).header("logger").header(secondHeader);
         for (final LoggerTO loggerTO : loggerTOs) {
-            tableBuilder.rowValues(
-                    new LinkedList<>(Arrays.asList(loggerTO.getKey(), loggerTO.getLevel().getLevel().name())));
+            tableBuilder.rowValues(Arrays.asList(loggerTO.getKey(), loggerTO.getLevel().getLevel().name()));
         }
         tableBuilder.build().print();
     }

http://git-wip-us.apache.org/repos/asf/syncope/blob/d731806c/client/cli/src/main/java/org/apache/syncope/client/cli/commands/logger/LoggerSyncopeOperations.java
----------------------------------------------------------------------
diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/logger/LoggerSyncopeOperations.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/logger/LoggerSyncopeOperations.java
index 14b7d18..823c6dd 100644
--- a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/logger/LoggerSyncopeOperations.java
+++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/logger/LoggerSyncopeOperations.java
@@ -18,9 +18,15 @@
  */
 package org.apache.syncope.client.cli.commands.logger;
 
+import java.util.ArrayList;
 import java.util.List;
+import java.util.Queue;
+import org.apache.commons.collections4.CollectionUtils;
+import org.apache.commons.collections4.Transformer;
 import org.apache.syncope.client.cli.SyncopeServices;
-import org.apache.syncope.common.lib.to.LoggerTO;
+import org.apache.syncope.common.lib.log.LogAppender;
+import org.apache.syncope.common.lib.log.LogStatementTO;
+import org.apache.syncope.common.lib.log.LoggerTO;
 import org.apache.syncope.common.lib.types.LoggerType;
 import org.apache.syncope.common.rest.api.service.LoggerService;
 
@@ -28,6 +34,20 @@ public class LoggerSyncopeOperations {
 
     private final LoggerService loggerService = SyncopeServices.get(LoggerService.class);
 
+    public List<String> listMemoryAppenders() {
+        return CollectionUtils.collect(loggerService.memoryAppenders(), new Transformer<LogAppender, String>() {
+
+            @Override
+            public String transform(final LogAppender input) {
+                return input.getName();
+            }
+        }, new ArrayList<String>());
+    }
+
+    public Queue<LogStatementTO> getLastLogStatements(final String appender) {
+        return loggerService.getLastLogStatements(appender);
+    }
+
     public List<LoggerTO> list() {
         return loggerService.list(LoggerType.LOG);
     }
@@ -39,7 +59,7 @@ public class LoggerSyncopeOperations {
     public LoggerTO read(final String loggerName) {
         return loggerService.read(LoggerType.LOG, loggerName);
     }
-    
+
     public void delete(final String loggerName) {
         loggerService.delete(LoggerType.LOG, loggerName);
     }

http://git-wip-us.apache.org/repos/asf/syncope/blob/d731806c/client/cli/src/main/java/org/apache/syncope/client/cli/commands/logger/LoggerUpdate.java
----------------------------------------------------------------------
diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/logger/LoggerUpdate.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/logger/LoggerUpdate.java
index 400cef3..03335b9 100644
--- a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/logger/LoggerUpdate.java
+++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/logger/LoggerUpdate.java
@@ -18,13 +18,14 @@
  */
 package org.apache.syncope.client.cli.commands.logger;
 
-import java.util.LinkedList;
+import java.util.ArrayList;
+import java.util.List;
 import javax.xml.ws.WebServiceException;
 import org.apache.commons.lang3.tuple.Pair;
 import org.apache.syncope.client.cli.Input;
 import org.apache.syncope.client.cli.util.CommandUtils;
 import org.apache.syncope.common.lib.SyncopeClientException;
-import org.apache.syncope.common.lib.to.LoggerTO;
+import org.apache.syncope.common.lib.log.LoggerTO;
 import org.apache.syncope.common.lib.types.LoggerLevel;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -44,7 +45,7 @@ public class LoggerUpdate extends AbstractLoggerCommand {
 
     public void update() {
         if (input.parameterNumber() >= 1) {
-            final LinkedList<LoggerTO> loggerTOs = new LinkedList<>();
+            final List<LoggerTO> loggerTOs = new ArrayList<>();
             boolean failed = false;
             for (String parameter : input.getParameters()) {
                 Pair<String, String> pairParameter = Input.toPairParameter(parameter);

http://git-wip-us.apache.org/repos/asf/syncope/blob/d731806c/client/cli/src/main/java/org/apache/syncope/client/cli/commands/logger/LoggerUpdateAll.java
----------------------------------------------------------------------
diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/logger/LoggerUpdateAll.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/logger/LoggerUpdateAll.java
index 69f28fe..2ba5728 100644
--- a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/logger/LoggerUpdateAll.java
+++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/logger/LoggerUpdateAll.java
@@ -18,12 +18,13 @@
  */
 package org.apache.syncope.client.cli.commands.logger;
 
-import java.util.LinkedList;
+import java.util.ArrayList;
+import java.util.List;
 import javax.xml.ws.WebServiceException;
 import org.apache.syncope.client.cli.Input;
 import org.apache.syncope.client.cli.util.CommandUtils;
 import org.apache.syncope.common.lib.SyncopeClientException;
-import org.apache.syncope.common.lib.to.LoggerTO;
+import org.apache.syncope.common.lib.log.LoggerTO;
 import org.apache.syncope.common.lib.types.LoggerLevel;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -42,7 +43,7 @@ public class LoggerUpdateAll extends AbstractLoggerCommand {
 
     public void updateAll() {
         if (input.parameterNumber() == 1) {
-            final LinkedList<LoggerTO> loggerTOs = new LinkedList<>();
+            final List<LoggerTO> loggerTOs = new ArrayList<>();
             boolean failed = false;
             for (final LoggerTO loggerTO : loggerSyncopeOperations.list()) {
                 try {

http://git-wip-us.apache.org/repos/asf/syncope/blob/d731806c/client/cli/src/main/java/org/apache/syncope/client/cli/commands/policy/PolicyList.java
----------------------------------------------------------------------
diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/policy/PolicyList.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/policy/PolicyList.java
index 95a7d98..213f2e4 100644
--- a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/policy/PolicyList.java
+++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/policy/PolicyList.java
@@ -18,11 +18,9 @@
  */
 package org.apache.syncope.client.cli.commands.policy;
 
-import java.util.LinkedList;
 import org.apache.syncope.client.cli.Input;
 import org.apache.syncope.client.cli.util.CommandUtils;
 import org.apache.syncope.common.lib.SyncopeClientException;
-import org.apache.syncope.common.lib.policy.AbstractPolicyTO;
 import org.apache.syncope.common.lib.types.PolicyType;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -43,11 +41,8 @@ public class PolicyList extends AbstractPolicyCommand {
     public void list() {
         if (input.parameterNumber() == 1) {
             try {
-                final LinkedList<AbstractPolicyTO> policyTOs = new LinkedList<>();
-                for (final AbstractPolicyTO policyTO : policySyncopeOperations.list(input.firstParameter())) {
-                    policyTOs.add(policyTO);
-                }
-                policyResultManager.printPoliciesByType(input.firstParameter(), policyTOs);
+                policyResultManager.printPoliciesByType(
+                        input.firstParameter(), policySyncopeOperations.list(input.firstParameter()));
             } catch (final SyncopeClientException ex) {
                 LOG.error("Error listing policy", ex);
                 policyResultManager.genericError(ex.getMessage());

http://git-wip-us.apache.org/repos/asf/syncope/blob/d731806c/client/cli/src/main/java/org/apache/syncope/client/cli/commands/policy/PolicyRead.java
----------------------------------------------------------------------
diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/policy/PolicyRead.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/policy/PolicyRead.java
index f399457..c33cba8 100644
--- a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/policy/PolicyRead.java
+++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/policy/PolicyRead.java
@@ -18,7 +18,8 @@
  */
 package org.apache.syncope.client.cli.commands.policy;
 
-import java.util.LinkedList;
+import java.util.ArrayList;
+import java.util.List;
 import javax.xml.ws.WebServiceException;
 import org.apache.syncope.client.cli.Input;
 import org.apache.syncope.common.lib.SyncopeClientException;
@@ -40,7 +41,7 @@ public class PolicyRead extends AbstractPolicyCommand {
 
     public void read() {
         if (input.parameterNumber() >= 1) {
-            final LinkedList<AbstractPolicyTO> policyTOs = new LinkedList<>();
+            final List<AbstractPolicyTO> policyTOs = new ArrayList<>();
             for (final String parameter : input.getParameters()) {
                 try {
                     policyTOs.add(policySyncopeOperations.read(parameter));

http://git-wip-us.apache.org/repos/asf/syncope/blob/d731806c/client/cli/src/main/java/org/apache/syncope/client/cli/commands/policy/PolicyResultManager.java
----------------------------------------------------------------------
diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/policy/PolicyResultManager.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/policy/PolicyResultManager.java
index e933128..baf9378 100644
--- a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/policy/PolicyResultManager.java
+++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/policy/PolicyResultManager.java
@@ -18,7 +18,7 @@
  */
 package org.apache.syncope.client.cli.commands.policy;
 
-import java.util.LinkedList;
+import java.util.List;
 import java.util.Map;
 import org.apache.syncope.client.cli.commands.CommonsResultManager;
 import org.apache.syncope.common.lib.policy.AbstractPolicyTO;
@@ -29,7 +29,7 @@ import org.apache.syncope.common.lib.types.PolicyType;
 
 public class PolicyResultManager extends CommonsResultManager {
 
-    public void printPolicies(final LinkedList<AbstractPolicyTO> policyTOs) {
+    public void printPolicies(final List<AbstractPolicyTO> policyTOs) {
         System.out.println("");
         for (AbstractPolicyTO policyTO : policyTOs) {
             if (policyTO instanceof AccountPolicyTO) {
@@ -42,7 +42,7 @@ public class PolicyResultManager extends CommonsResultManager {
         }
     }
 
-    public void printPoliciesByType(final String policyTypeString, final LinkedList<AbstractPolicyTO> policyTOs) {
+    public void printPoliciesByType(final String policyTypeString, final List<AbstractPolicyTO> policyTOs) {
         System.out.println("");
         final PolicyType policyType = PolicyType.valueOf(policyTypeString);
         switch (policyType) {

http://git-wip-us.apache.org/repos/asf/syncope/blob/d731806c/client/cli/src/main/java/org/apache/syncope/client/cli/commands/schema/SchemaList.java
----------------------------------------------------------------------
diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/schema/SchemaList.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/schema/SchemaList.java
index 5615b50..bc7c3e6 100644
--- a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/schema/SchemaList.java
+++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/schema/SchemaList.java
@@ -18,11 +18,9 @@
  */
 package org.apache.syncope.client.cli.commands.schema;
 
-import java.util.LinkedList;
 import org.apache.syncope.client.cli.Input;
 import org.apache.syncope.client.cli.util.CommandUtils;
 import org.apache.syncope.common.lib.SyncopeClientException;
-import org.apache.syncope.common.lib.to.AbstractSchemaTO;
 import org.apache.syncope.common.lib.types.SchemaType;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -43,11 +41,8 @@ public class SchemaList extends AbstractSchemaCommand {
     public void list() {
         if (input.parameterNumber() == 1) {
             try {
-                final LinkedList<AbstractSchemaTO> schemaTOs = new LinkedList<>();
-                for (final AbstractSchemaTO schemaTO : schemaSyncopeOperations.list(input.firstParameter())) {
-                    schemaTOs.add(schemaTO);
-                }
-                schemaResultManager.toView(input.firstParameter(), schemaTOs);
+                schemaResultManager.toView(
+                        input.firstParameter(), schemaSyncopeOperations.list(input.firstParameter()));
             } catch (final SyncopeClientException ex) {
                 LOG.error("Error listing schema", ex);
                 schemaResultManager.genericError(ex.getMessage());

http://git-wip-us.apache.org/repos/asf/syncope/blob/d731806c/client/cli/src/main/java/org/apache/syncope/client/cli/commands/schema/SchemaListAll.java
----------------------------------------------------------------------
diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/schema/SchemaListAll.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/schema/SchemaListAll.java
index fb03347..0380487 100644
--- a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/schema/SchemaListAll.java
+++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/schema/SchemaListAll.java
@@ -18,11 +18,9 @@
  */
 package org.apache.syncope.client.cli.commands.schema;
 
-import java.util.LinkedList;
 import javax.xml.ws.WebServiceException;
 import org.apache.syncope.client.cli.Input;
 import org.apache.syncope.common.lib.SyncopeClientException;
-import org.apache.syncope.common.lib.to.AbstractSchemaTO;
 import org.apache.syncope.common.lib.types.SchemaType;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -43,11 +41,7 @@ public class SchemaListAll extends AbstractSchemaCommand {
         if (input.parameterNumber() == 0) {
             try {
                 for (final SchemaType schemaType : SchemaType.values()) {
-                    final LinkedList<AbstractSchemaTO> schemaTOs = new LinkedList<>();
-                    for (final AbstractSchemaTO schemaTO : schemaSyncopeOperations.list(schemaType.name())) {
-                        schemaTOs.add(schemaTO);
-                    }
-                    schemaResultManager.toView(schemaType.name(), schemaTOs);
+                    schemaResultManager.toView(schemaType.name(), schemaSyncopeOperations.list(schemaType.name()));
                 }
             } catch (final SyncopeClientException | WebServiceException ex) {
                 LOG.error("Error listing schema", ex);

http://git-wip-us.apache.org/repos/asf/syncope/blob/d731806c/client/cli/src/main/java/org/apache/syncope/client/cli/commands/schema/SchemaListDerived.java
----------------------------------------------------------------------
diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/schema/SchemaListDerived.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/schema/SchemaListDerived.java
index c47af9f..bc88a74 100644
--- a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/schema/SchemaListDerived.java
+++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/schema/SchemaListDerived.java
@@ -18,11 +18,9 @@
  */
 package org.apache.syncope.client.cli.commands.schema;
 
-import java.util.LinkedList;
 import javax.xml.ws.WebServiceException;
 import org.apache.syncope.client.cli.Input;
 import org.apache.syncope.common.lib.SyncopeClientException;
-import org.apache.syncope.common.lib.to.AbstractSchemaTO;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -41,11 +39,7 @@ public class SchemaListDerived extends AbstractSchemaCommand {
     public void listDerived() {
         if (input.parameterNumber() == 0) {
             try {
-                final LinkedList<AbstractSchemaTO> schemaTOs = new LinkedList<>();
-                for (final AbstractSchemaTO schemaTO : schemaSyncopeOperations.listDerived()) {
-                    schemaTOs.add(schemaTO);
-                }
-                schemaResultManager.fromListDerived(schemaTOs);
+                schemaResultManager.fromListDerived(schemaSyncopeOperations.listDerived());
             } catch (final SyncopeClientException | WebServiceException ex) {
                 LOG.error("Error listing schema", ex);
                 schemaResultManager.genericError(ex.getMessage());

http://git-wip-us.apache.org/repos/asf/syncope/blob/d731806c/client/cli/src/main/java/org/apache/syncope/client/cli/commands/schema/SchemaListPlain.java
----------------------------------------------------------------------
diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/schema/SchemaListPlain.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/schema/SchemaListPlain.java
index 5b18219..38422c4 100644
--- a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/schema/SchemaListPlain.java
+++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/schema/SchemaListPlain.java
@@ -18,11 +18,9 @@
  */
 package org.apache.syncope.client.cli.commands.schema;
 
-import java.util.LinkedList;
 import javax.xml.ws.WebServiceException;
 import org.apache.syncope.client.cli.Input;
 import org.apache.syncope.common.lib.SyncopeClientException;
-import org.apache.syncope.common.lib.to.AbstractSchemaTO;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -41,11 +39,7 @@ public class SchemaListPlain extends AbstractSchemaCommand {
     public void listPlain() {
         if (input.parameterNumber() == 0) {
             try {
-                final LinkedList<AbstractSchemaTO> schemaTOs = new LinkedList<>();
-                for (final AbstractSchemaTO schemaTO : schemaSyncopeOperations.listPlain()) {
-                    schemaTOs.add(schemaTO);
-                }
-                schemaResultManager.printPlainSchemas(schemaTOs);
+                schemaResultManager.printPlainSchemas(schemaSyncopeOperations.listPlain());
             } catch (final SyncopeClientException | WebServiceException ex) {
                 LOG.error("Error listing schema", ex);
                 schemaResultManager.genericError(ex.getMessage());

http://git-wip-us.apache.org/repos/asf/syncope/blob/d731806c/client/cli/src/main/java/org/apache/syncope/client/cli/commands/schema/SchemaListVirtual.java
----------------------------------------------------------------------
diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/schema/SchemaListVirtual.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/schema/SchemaListVirtual.java
index 31d3657..24426d1 100644
--- a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/schema/SchemaListVirtual.java
+++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/schema/SchemaListVirtual.java
@@ -18,11 +18,9 @@
  */
 package org.apache.syncope.client.cli.commands.schema;
 
-import java.util.LinkedList;
 import javax.xml.ws.WebServiceException;
 import org.apache.syncope.client.cli.Input;
 import org.apache.syncope.common.lib.SyncopeClientException;
-import org.apache.syncope.common.lib.to.AbstractSchemaTO;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -41,11 +39,7 @@ public class SchemaListVirtual extends AbstractSchemaCommand {
     public void listVirtual() {
         if (input.parameterNumber() == 0) {
             try {
-                final LinkedList<AbstractSchemaTO> schemaTOs = new LinkedList<>();
-                for (final AbstractSchemaTO schemaTO : schemaSyncopeOperations.listVirtual()) {
-                    schemaTOs.add(schemaTO);
-                }
-                schemaResultManager.fromListVirtual(schemaTOs);
+                schemaResultManager.fromListVirtual(schemaSyncopeOperations.listVirtual());
             } catch (final SyncopeClientException | WebServiceException ex) {
                 LOG.error("Error listing schema", ex);
                 schemaResultManager.genericError(ex.getMessage());

http://git-wip-us.apache.org/repos/asf/syncope/blob/d731806c/client/cli/src/main/java/org/apache/syncope/client/cli/commands/schema/SchemaRead.java
----------------------------------------------------------------------
diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/schema/SchemaRead.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/schema/SchemaRead.java
index 0459cac..0f99ed7 100644
--- a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/schema/SchemaRead.java
+++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/schema/SchemaRead.java
@@ -18,8 +18,9 @@
  */
 package org.apache.syncope.client.cli.commands.schema;
 
+import java.util.ArrayList;
 import java.util.Arrays;
-import java.util.LinkedList;
+import java.util.List;
 import javax.xml.ws.WebServiceException;
 import org.apache.syncope.client.cli.Input;
 import org.apache.syncope.client.cli.util.CommandUtils;
@@ -46,7 +47,7 @@ public class SchemaRead extends AbstractSchemaCommand {
         if (input.parameterNumber() >= 2) {
             final String[] parameters = Arrays.copyOfRange(input.getParameters(), 1, input.parameterNumber());
             try {
-                final LinkedList<AbstractSchemaTO> schemaTOs = new LinkedList<>();
+                final List<AbstractSchemaTO> schemaTOs = new ArrayList<>();
                 for (final String parameter : parameters) {
                     schemaTOs.add(schemaSyncopeOperations.read(input.firstParameter(), parameter));
                 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/d731806c/client/cli/src/main/java/org/apache/syncope/client/cli/commands/schema/SchemaResultManager.java
----------------------------------------------------------------------
diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/schema/SchemaResultManager.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/schema/SchemaResultManager.java
index 0692ccd..cb87fe0 100644
--- a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/schema/SchemaResultManager.java
+++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/schema/SchemaResultManager.java
@@ -19,7 +19,7 @@
 package org.apache.syncope.client.cli.commands.schema;
 
 import java.util.Arrays;
-import java.util.LinkedList;
+import java.util.List;
 import java.util.Map;
 import org.apache.syncope.client.cli.commands.CommonsResultManager;
 import org.apache.syncope.client.cli.view.Table;
@@ -31,7 +31,7 @@ import org.apache.syncope.common.lib.types.SchemaType;
 
 public class SchemaResultManager extends CommonsResultManager {
 
-    public void toView(final String schemaTypeString, final LinkedList<? extends AbstractSchemaTO> schemaTOs) {
+    public void toView(final String schemaTypeString, final List<? extends AbstractSchemaTO> schemaTOs) {
         switch (SchemaType.valueOf(schemaTypeString)) {
             case PLAIN:
                 printPlainSchemasDetailed(schemaTOs);
@@ -47,7 +47,7 @@ public class SchemaResultManager extends CommonsResultManager {
         }
     }
 
-    private void printPlainSchemasDetailed(final LinkedList<? extends AbstractSchemaTO> schemaTOs) {
+    private void printPlainSchemasDetailed(final List<? extends AbstractSchemaTO> schemaTOs) {
         System.out.println("");
         for (final AbstractSchemaTO schemaTO : schemaTOs) {
             printPlanSchemaDetailed((PlainSchemaTO) schemaTO);
@@ -67,36 +67,36 @@ public class SchemaResultManager extends CommonsResultManager {
         System.out.println("");
     }
 
-    public void printPlainSchemas(final LinkedList<? extends AbstractSchemaTO> schemaTOs) {
+    public void printPlainSchemas(final List<? extends AbstractSchemaTO> schemaTOs) {
         final Table.TableBuilder tableBuilder =
                 new Table.TableBuilder("plain schemas").header("schema key").header("type").header("mandatory");
         for (final AbstractSchemaTO schemaTO : schemaTOs) {
-            tableBuilder.rowValues(new LinkedList<>(Arrays.asList(
+            tableBuilder.rowValues(Arrays.asList(
                     ((PlainSchemaTO) schemaTO).getKey(),
                     ((PlainSchemaTO) schemaTO).getType().toString(),
-                    ((PlainSchemaTO) schemaTO).getMandatoryCondition())));
+                    ((PlainSchemaTO) schemaTO).getMandatoryCondition()));
         }
         tableBuilder.build().print();
     }
 
-    public void fromListDerived(final LinkedList<? extends AbstractSchemaTO> schemaTOs) {
+    public void fromListDerived(final List<? extends AbstractSchemaTO> schemaTOs) {
         final Table.TableBuilder tableBuilder =
                 new Table.TableBuilder("derived schemas").header("schema key").header("expression");
         for (final AbstractSchemaTO schemaTO : schemaTOs) {
-            tableBuilder.rowValues(new LinkedList<>(Arrays.asList(
+            tableBuilder.rowValues(Arrays.asList(
                     ((DerSchemaTO) schemaTO).getKey(),
-                    ((DerSchemaTO) schemaTO).getExpression())));
+                    ((DerSchemaTO) schemaTO).getExpression()));
         }
         tableBuilder.build().print();
     }
 
-    public void fromListVirtual(final LinkedList<? extends AbstractSchemaTO> schemaTOs) {
+    public void fromListVirtual(final List<? extends AbstractSchemaTO> schemaTOs) {
         final Table.TableBuilder tableBuilder =
                 new Table.TableBuilder("virtual schemas").header("schema key").header("readonly");
         for (final AbstractSchemaTO schemaTO : schemaTOs) {
-            tableBuilder.rowValues(new LinkedList<>(Arrays.asList(
+            tableBuilder.rowValues(Arrays.asList(
                     ((VirSchemaTO) schemaTO).getKey(),
-                    String.valueOf(((VirSchemaTO) schemaTO).isReadonly()))));
+                    String.valueOf(((VirSchemaTO) schemaTO).isReadonly())));
         }
         tableBuilder.build().print();
     }

http://git-wip-us.apache.org/repos/asf/syncope/blob/d731806c/client/cli/src/main/java/org/apache/syncope/client/cli/commands/task/TaskList.java
----------------------------------------------------------------------
diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/task/TaskList.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/task/TaskList.java
index 90b9cf8..e162c1b 100644
--- a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/task/TaskList.java
+++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/task/TaskList.java
@@ -18,11 +18,9 @@
  */
 package org.apache.syncope.client.cli.commands.task;
 
-import java.util.LinkedList;
 import org.apache.syncope.client.cli.Input;
 import org.apache.syncope.client.cli.util.CommandUtils;
 import org.apache.syncope.common.lib.SyncopeClientException;
-import org.apache.syncope.common.lib.to.AbstractTaskTO;
 import org.apache.syncope.common.lib.types.TaskType;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -43,11 +41,8 @@ public class TaskList extends AbstractTaskCommand {
     public void list() {
         if (input.parameterNumber() == 1) {
             try {
-                final LinkedList<AbstractTaskTO> taskTOs = new LinkedList<>();
-                for (final AbstractTaskTO taskTO : taskSyncopeOperations.list(input.firstParameter())) {
-                    taskTOs.add(taskTO);
-                }
-                taskResultManager.printTasksType(input.firstParameter(), taskTOs);
+                taskResultManager.printTasksType(
+                        input.firstParameter(), taskSyncopeOperations.list(input.firstParameter()));
             } catch (final SyncopeClientException ex) {
                 LOG.error("Error listing task", ex);
                 taskResultManager.genericError(ex.getMessage());

http://git-wip-us.apache.org/repos/asf/syncope/blob/d731806c/client/cli/src/main/java/org/apache/syncope/client/cli/commands/task/TaskRead.java
----------------------------------------------------------------------
diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/task/TaskRead.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/task/TaskRead.java
index b1fd01a..14ebc30 100644
--- a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/task/TaskRead.java
+++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/task/TaskRead.java
@@ -18,7 +18,8 @@
  */
 package org.apache.syncope.client.cli.commands.task;
 
-import java.util.LinkedList;
+import java.util.ArrayList;
+import java.util.List;
 import javax.xml.ws.WebServiceException;
 import org.apache.syncope.client.cli.Input;
 import org.apache.syncope.common.lib.SyncopeClientException;
@@ -40,7 +41,7 @@ public class TaskRead extends AbstractTaskCommand {
 
     public void read() {
         if (input.parameterNumber() >= 1) {
-            final LinkedList<AbstractTaskTO> taskTOs = new LinkedList<>();
+            final List<AbstractTaskTO> taskTOs = new ArrayList<>();
             for (final String parameter : input.getParameters()) {
                 try {
                     taskTOs.add(taskSyncopeOperations.read(parameter));

http://git-wip-us.apache.org/repos/asf/syncope/blob/d731806c/client/cli/src/main/java/org/apache/syncope/client/cli/commands/task/TaskResultManager.java
----------------------------------------------------------------------
diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/task/TaskResultManager.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/task/TaskResultManager.java
index dd98416..5516440 100644
--- a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/task/TaskResultManager.java
+++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/task/TaskResultManager.java
@@ -18,7 +18,6 @@
  */
 package org.apache.syncope.client.cli.commands.task;
 
-import java.util.LinkedList;
 import java.util.List;
 import java.util.Map;
 import org.apache.syncope.client.cli.commands.CommonsResultManager;
@@ -35,7 +34,7 @@ import org.apache.syncope.common.lib.types.TaskType;
 
 public class TaskResultManager extends CommonsResultManager {
 
-    public void printTasks(final LinkedList<AbstractTaskTO> taskTOs) {
+    public void printTasks(final List<AbstractTaskTO> taskTOs) {
         System.out.println("");
         for (final AbstractTaskTO taskTO : taskTOs) {
             if (taskTO instanceof NotificationTaskTO) {
@@ -52,7 +51,7 @@ public class TaskResultManager extends CommonsResultManager {
         }
     }
 
-    public void printTasksType(final String taskTypeString, final LinkedList<AbstractTaskTO> taskTOs) {
+    public void printTasksType(final String taskTypeString, final List<AbstractTaskTO> taskTOs) {
         System.out.println("");
         switch (TaskType.valueOf(taskTypeString)) {
             case NOTIFICATION:

http://git-wip-us.apache.org/repos/asf/syncope/blob/d731806c/client/cli/src/main/java/org/apache/syncope/client/cli/commands/user/UserList.java
----------------------------------------------------------------------
diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/user/UserList.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/user/UserList.java
index 2b2f7b1..48be66c 100644
--- a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/user/UserList.java
+++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/user/UserList.java
@@ -18,7 +18,6 @@
  */
 package org.apache.syncope.client.cli.commands.user;
 
-import java.util.LinkedList;
 import java.util.Scanner;
 import org.apache.syncope.client.cli.Input;
 import org.apache.syncope.common.lib.SyncopeClientException;
@@ -48,7 +47,7 @@ public class UserList extends AbstractUserCommand {
                 final String answer = scanIn.nextLine();
                 if ("yes".equalsIgnoreCase(answer)) {
                     final PagedResult<UserTO> uResult = userSyncopeOperations.list();
-                    userResultManager.printUsers(new LinkedList<>(uResult.getResult()));
+                    userResultManager.printUsers(uResult.getResult());
                 } else if ("no".equalsIgnoreCase(answer)) {
                     userResultManager.genericError("List operation skipped");
                 } else {

http://git-wip-us.apache.org/repos/asf/syncope/blob/d731806c/client/cli/src/main/java/org/apache/syncope/client/cli/commands/user/UserResultManager.java
----------------------------------------------------------------------
diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/user/UserResultManager.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/user/UserResultManager.java
index 4a1111a..450ff7e 100644
--- a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/user/UserResultManager.java
+++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/user/UserResultManager.java
@@ -19,7 +19,6 @@
 package org.apache.syncope.client.cli.commands.user;
 
 import java.util.Arrays;
-import java.util.LinkedList;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
@@ -102,7 +101,7 @@ public class UserResultManager extends CommonsResultManager {
         final Table.TableBuilder tableBuilder =
                 new Table.TableBuilder("Users not deleted").header("user key").header("cause");
         for (final Map.Entry<String, String> entrySet : users.entrySet()) {
-            tableBuilder.rowValues(new LinkedList<>(Arrays.asList(entrySet.getKey(), entrySet.getValue())));
+            tableBuilder.rowValues(Arrays.asList(entrySet.getKey(), entrySet.getValue()));
         }
         tableBuilder.build().print();
     }

http://git-wip-us.apache.org/repos/asf/syncope/blob/d731806c/client/cli/src/main/java/org/apache/syncope/client/cli/view/Table.java
----------------------------------------------------------------------
diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/view/Table.java b/client/cli/src/main/java/org/apache/syncope/client/cli/view/Table.java
index e8159c6..d0ce110 100644
--- a/client/cli/src/main/java/org/apache/syncope/client/cli/view/Table.java
+++ b/client/cli/src/main/java/org/apache/syncope/client/cli/view/Table.java
@@ -18,8 +18,9 @@
  */
 package org.apache.syncope.client.cli.view;
 
+import java.util.ArrayList;
 import java.util.LinkedHashSet;
-import java.util.LinkedList;
+import java.util.List;
 import java.util.Set;
 import org.apache.commons.lang3.StringUtils;
 
@@ -29,9 +30,9 @@ public final class Table {
 
     private final String title;
 
-    private final LinkedList<String> headers;
+    private final List<String> headers;
 
-    private final Set<LinkedList<String>> values;
+    private final Set<List<String>> values;
 
     private int columnsNumber;
 
@@ -47,8 +48,8 @@ public final class Table {
 
     private Table(
             final String title,
-            final LinkedList<String> headers,
-            final Set<LinkedList<String>> values) {
+            final List<String> headers,
+            final Set<List<String>> values) {
         this.title = title;
         this.headers = headers;
         this.values = values;
@@ -94,7 +95,7 @@ public final class Table {
             }
         }
 
-        for (final LinkedList<String> value : values) {
+        for (final List<String> value : values) {
             for (int j = 0; j < columnsSize.length; j++) {
                 if (value.get(j) != null && value.get(j).length() > columnsSize[j]) {
                     columnsSize[j] = value.get(j).length();
@@ -145,7 +146,7 @@ public final class Table {
     private void printeContent() {
         printColumnSpace();
 
-        for (final LinkedList<String> value : values) {
+        for (final List<String> value : values) {
             for (int j = 0; j < columnsNumber; j++) {
                 if (value.get(j) == null) {
                     tmpValuesArray[j] = StringUtils.center("null", columnsSize[j]);
@@ -169,9 +170,9 @@ public final class Table {
 
     public static class TableBuilder {
 
-        private final LinkedList<String> headers = new LinkedList<>();
+        private final List<String> headers = new ArrayList<>();
 
-        private final Set<LinkedList<String>> values = new LinkedHashSet<>();
+        private final Set<List<String>> values = new LinkedHashSet<>();
 
         private final String title;
 
@@ -184,7 +185,7 @@ public final class Table {
             return this;
         }
 
-        public TableBuilder rowValues(final LinkedList<String> row) {
+        public TableBuilder rowValues(final List<String> row) {
             values.add(row);
             return this;
         }

http://git-wip-us.apache.org/repos/asf/syncope/blob/d731806c/client/console/src/main/java/org/apache/syncope/client/console/events/EventCategoryPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/events/EventCategoryPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/events/EventCategoryPanel.java
index 61a88ec..6796fc3 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/events/EventCategoryPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/events/EventCategoryPanel.java
@@ -37,7 +37,7 @@ import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
 import org.apache.syncope.client.console.wicket.markup.html.form.ActionLinksPanel;
 import org.apache.syncope.client.console.wicket.markup.html.form.AjaxDropDownChoicePanel;
 import org.apache.syncope.client.console.wicket.markup.html.form.AjaxTextFieldPanel;
-import org.apache.syncope.common.lib.to.EventCategoryTO;
+import org.apache.syncope.common.lib.log.EventCategoryTO;
 import org.apache.syncope.common.lib.types.AuditElements;
 import org.apache.syncope.common.lib.types.AuditElements.EventCategoryType;
 import org.apache.syncope.common.lib.types.AuditLoggerName;
@@ -210,7 +210,7 @@ public abstract class EventCategoryPanel extends Panel {
                                     null,
                                     null,
                                     parsed.getKey().getEvents().isEmpty()
-                                            ? StringUtils.EMPTY : parsed.getKey().getEvents().iterator().next(),
+                                    ? StringUtils.EMPTY : parsed.getKey().getEvents().iterator().next(),
                                     parsed.getValue());
 
                             custom.setModelObject(StringUtils.EMPTY);
@@ -237,7 +237,7 @@ public abstract class EventCategoryPanel extends Panel {
                                     null,
                                     null,
                                     parsed.getKey().getEvents().isEmpty()
-                                            ? StringUtils.EMPTY : parsed.getKey().getEvents().iterator().next(),
+                                    ? StringUtils.EMPTY : parsed.getKey().getEvents().iterator().next(),
                                     parsed.getValue());
 
                             custom.setModelObject(StringUtils.EMPTY);
@@ -264,7 +264,7 @@ public abstract class EventCategoryPanel extends Panel {
                                     null,
                                     null,
                                     parsed.getKey().getEvents().isEmpty()
-                                            ? StringUtils.EMPTY : parsed.getKey().getEvents().iterator().next(),
+                                    ? StringUtils.EMPTY : parsed.getKey().getEvents().iterator().next(),
                                     parsed.getValue());
 
                             custom.setModelObject(StringUtils.EMPTY);
@@ -399,7 +399,7 @@ public abstract class EventCategoryPanel extends Panel {
                         categoryEvent.getKey().getCategory(),
                         categoryEvent.getKey().getSubcategory(),
                         categoryEvent.getKey().getEvents().isEmpty()
-                                ? StringUtils.EMPTY : categoryEvent.getKey().getEvents().iterator().next(),
+                        ? StringUtils.EMPTY : categoryEvent.getKey().getEvents().iterator().next(),
                         categoryEvent.getValue()));
 
                 category.setEnabled(false);

http://git-wip-us.apache.org/repos/asf/syncope/blob/d731806c/client/console/src/main/java/org/apache/syncope/client/console/events/EventSelectionPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/events/EventSelectionPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/events/EventSelectionPanel.java
index 54a4506..33844d9 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/events/EventSelectionPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/events/EventSelectionPanel.java
@@ -24,7 +24,7 @@ import java.util.List;
 import java.util.Set;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.syncope.client.console.wicket.ajax.form.IndicatorAjaxFormChoiceComponentUpdatingBehavior;
-import org.apache.syncope.common.lib.to.EventCategoryTO;
+import org.apache.syncope.common.lib.log.EventCategoryTO;
 import org.apache.syncope.common.lib.types.AuditElements;
 import org.apache.syncope.common.lib.types.AuditLoggerName;
 import org.apache.wicket.ajax.AjaxRequestTarget;

http://git-wip-us.apache.org/repos/asf/syncope/blob/d731806c/client/console/src/main/java/org/apache/syncope/client/console/pages/Audit.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/Audit.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/Audit.java
index 9a5fc4a..33df05a 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/pages/Audit.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/Audit.java
@@ -28,7 +28,7 @@ import org.apache.syncope.client.console.BookmarkablePageLinkBuilder;
 import org.apache.syncope.client.console.events.EventCategoryPanel;
 import org.apache.syncope.client.console.events.SelectedEventsPanel;
 import org.apache.syncope.client.console.rest.LoggerRestClient;
-import org.apache.syncope.common.lib.to.EventCategoryTO;
+import org.apache.syncope.common.lib.log.EventCategoryTO;
 import org.apache.syncope.common.lib.types.AuditElements;
 import org.apache.syncope.common.lib.types.AuditLoggerName;
 import org.apache.syncope.common.lib.types.StandardEntitlement;

http://git-wip-us.apache.org/repos/asf/syncope/blob/d731806c/client/console/src/main/java/org/apache/syncope/client/console/panels/AbstractLogsPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/AbstractLogsPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/AbstractLogsPanel.java
index 388b07f..dac4ab5 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/AbstractLogsPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/AbstractLogsPanel.java
@@ -28,7 +28,7 @@ import org.apache.syncope.client.console.wicket.ajax.form.IndicatorAjaxFormCompo
 import org.apache.syncope.client.console.wicket.markup.html.form.AjaxDropDownChoicePanel;
 import org.apache.syncope.common.lib.AbstractBaseBean;
 import org.apache.syncope.common.lib.SyncopeClientException;
-import org.apache.syncope.common.lib.to.LoggerTO;
+import org.apache.syncope.common.lib.log.LoggerTO;
 import org.apache.syncope.common.lib.types.LoggerLevel;
 import org.apache.syncope.common.lib.types.StandardEntitlement;
 import org.apache.wicket.Component;

http://git-wip-us.apache.org/repos/asf/syncope/blob/d731806c/client/console/src/main/java/org/apache/syncope/client/console/panels/ConsoleLogPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/ConsoleLogPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/ConsoleLogPanel.java
index a024a03..6ef4108 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/ConsoleLogPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/ConsoleLogPanel.java
@@ -25,7 +25,7 @@ import org.apache.logging.log4j.LogManager;
 import org.apache.logging.log4j.core.LoggerContext;
 import org.apache.logging.log4j.core.config.LoggerConfig;
 import org.apache.syncope.common.lib.SyncopeConstants;
-import org.apache.syncope.common.lib.to.LoggerTO;
+import org.apache.syncope.common.lib.log.LoggerTO;
 import org.apache.syncope.common.lib.types.LoggerLevel;
 import org.apache.wicket.PageReference;
 

http://git-wip-us.apache.org/repos/asf/syncope/blob/d731806c/client/console/src/main/java/org/apache/syncope/client/console/panels/CoreLogPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/CoreLogPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/CoreLogPanel.java
index c620f10..aeb672e 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/CoreLogPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/CoreLogPanel.java
@@ -19,7 +19,7 @@
 package org.apache.syncope.client.console.panels;
 
 import org.apache.syncope.client.console.SyncopeConsoleSession;
-import org.apache.syncope.common.lib.to.LoggerTO;
+import org.apache.syncope.common.lib.log.LoggerTO;
 import org.apache.syncope.common.lib.types.LoggerType;
 import org.apache.syncope.common.rest.api.service.LoggerService;
 import org.apache.wicket.PageReference;

http://git-wip-us.apache.org/repos/asf/syncope/blob/d731806c/client/console/src/main/java/org/apache/syncope/client/console/rest/LoggerRestClient.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/rest/LoggerRestClient.java b/client/console/src/main/java/org/apache/syncope/client/console/rest/LoggerRestClient.java
index 985d54c..4922940 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/rest/LoggerRestClient.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/rest/LoggerRestClient.java
@@ -24,8 +24,8 @@ import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
-import org.apache.syncope.common.lib.to.EventCategoryTO;
-import org.apache.syncope.common.lib.to.LoggerTO;
+import org.apache.syncope.common.lib.log.EventCategoryTO;
+import org.apache.syncope.common.lib.log.LoggerTO;
 import org.apache.syncope.common.lib.types.AuditLoggerName;
 import org.apache.syncope.common.lib.types.LoggerLevel;
 import org.apache.syncope.common.lib.types.LoggerType;
@@ -46,12 +46,12 @@ public class LoggerRestClient extends BaseRestClient {
 
     public Map<String, Set<AuditLoggerName>> listAuditsByCategory() {
         Map<String, Set<AuditLoggerName>> result = new HashMap<>();
-        for (AuditLoggerName auditLoggerName : listAudits()) {
-            if (!result.containsKey(auditLoggerName.getCategory())) {
-                result.put(auditLoggerName.getCategory(), new HashSet<AuditLoggerName>());
+        for (AuditLoggerName audit : listAudits()) {
+            if (!result.containsKey(audit.getCategory())) {
+                result.put(audit.getCategory(), new HashSet<AuditLoggerName>());
             }
 
-            result.get(auditLoggerName.getCategory()).add(auditLoggerName);
+            result.get(audit.getCategory()).add(audit);
         }
 
         return result;

http://git-wip-us.apache.org/repos/asf/syncope/blob/d731806c/common/lib/src/main/java/org/apache/syncope/common/lib/log/EventCategoryTO.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/log/EventCategoryTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/log/EventCategoryTO.java
new file mode 100644
index 0000000..3ea4778
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/log/EventCategoryTO.java
@@ -0,0 +1,92 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.common.lib.log;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElementWrapper;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.apache.syncope.common.lib.AbstractBaseBean;
+import org.apache.syncope.common.lib.types.AuditElements;
+
+@XmlRootElement(name = "eventCategory")
+@XmlType
+public class EventCategoryTO extends AbstractBaseBean {
+
+    private static final long serialVersionUID = -4340060002701633401L;
+
+    private AuditElements.EventCategoryType type;
+
+    private String category;
+
+    private String subcategory;
+
+    private final List<String> events = new ArrayList<>();
+
+    /**
+     * Constructor for Type.REST event category.
+     */
+    public EventCategoryTO() {
+        this(AuditElements.EventCategoryType.LOGIC);
+    }
+
+    /**
+     * Constructor for the given Type event category.
+     *
+     * @param type event category type
+     */
+    public EventCategoryTO(final AuditElements.EventCategoryType type) {
+        super();
+        this.type = type;
+    }
+
+    public AuditElements.EventCategoryType getType() {
+        return type;
+    }
+
+    public void setType(final AuditElements.EventCategoryType type) {
+        this.type = type == null ? AuditElements.EventCategoryType.CUSTOM : type;
+    }
+
+    public String getCategory() {
+        return category;
+    }
+
+    public void setCategory(final String category) {
+        this.category = category;
+    }
+
+    public String getSubcategory() {
+        return subcategory;
+    }
+
+    public void setSubcategory(final String subcategory) {
+        this.subcategory = subcategory;
+    }
+
+    @XmlElementWrapper(name = "events")
+    @XmlElement(name = "event")
+    @JsonProperty("events")
+    public List<String> getEvents() {
+        return events;
+    }
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/d731806c/common/lib/src/main/java/org/apache/syncope/common/lib/log/LogAppender.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/log/LogAppender.java b/common/lib/src/main/java/org/apache/syncope/common/lib/log/LogAppender.java
new file mode 100644
index 0000000..317ed59
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/log/LogAppender.java
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.common.lib.log;
+
+import org.apache.syncope.common.lib.AbstractBaseBean;
+
+public class LogAppender extends AbstractBaseBean {
+
+    private static final long serialVersionUID = 5975199884460548302L;
+
+    private String name;
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(final String name) {
+        this.name = name;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/d731806c/common/lib/src/main/java/org/apache/syncope/common/lib/log/LogStatementTO.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/log/LogStatementTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/log/LogStatementTO.java
new file mode 100644
index 0000000..11e22c9
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/log/LogStatementTO.java
@@ -0,0 +1,108 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.common.lib.log;
+
+import java.io.Serializable;
+import org.apache.syncope.common.lib.types.LoggerLevel;
+
+public class LogStatementTO implements Serializable {
+
+    private static final long serialVersionUID = -2931205859104653385L;
+
+    private LoggerLevel level;
+
+    private String loggerName;
+
+    private String message;
+
+    private String stackTrace;
+
+    private long timeMillis;
+
+    private long threadId;
+
+    private String threadName;
+
+    private int threadPriority;
+
+    public LoggerLevel getLevel() {
+        return level;
+    }
+
+    public void setLevel(final LoggerLevel level) {
+        this.level = level;
+    }
+
+    public String getLoggerName() {
+        return loggerName;
+    }
+
+    public void setLoggerName(final String loggerName) {
+        this.loggerName = loggerName;
+    }
+
+    public String getMessage() {
+        return message;
+    }
+
+    public void setMessage(final String message) {
+        this.message = message;
+    }
+
+    public String getStackTrace() {
+        return stackTrace;
+    }
+
+    public void setStackTrace(final String stackTrace) {
+        this.stackTrace = stackTrace;
+    }
+
+    public long getTimeMillis() {
+        return timeMillis;
+    }
+
+    public void setTimeMillis(final long timeMillis) {
+        this.timeMillis = timeMillis;
+    }
+
+    public long getThreadId() {
+        return threadId;
+    }
+
+    public void setThreadId(final long threadId) {
+        this.threadId = threadId;
+    }
+
+    public String getThreadName() {
+        return threadName;
+    }
+
+    public void setThreadName(final String threadName) {
+        this.threadName = threadName;
+    }
+
+    public int getThreadPriority() {
+        return threadPriority;
+    }
+
+    public void setThreadPriority(final int threadPriority) {
+        this.threadPriority = threadPriority;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/d731806c/common/lib/src/main/java/org/apache/syncope/common/lib/log/LoggerTO.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/log/LoggerTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/log/LoggerTO.java
new file mode 100644
index 0000000..f908d2b
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/log/LoggerTO.java
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.common.lib.log;
+
+import javax.ws.rs.PathParam;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.apache.syncope.common.lib.AbstractBaseBean;
+import org.apache.syncope.common.lib.types.LoggerLevel;
+
+@XmlRootElement(name = "logger")
+@XmlType
+public class LoggerTO extends AbstractBaseBean {
+
+    private static final long serialVersionUID = -7794833835668648505L;
+
+    private String key;
+
+    private LoggerLevel level;
+
+    public LoggerLevel getLevel() {
+        return level;
+    }
+
+    public void setLevel(final LoggerLevel level) {
+        this.level = level;
+    }
+
+    public String getKey() {
+        return key;
+    }
+
+    @PathParam("key")
+    public void setKey(final String key) {
+        this.key = key;
+    }
+}


Mime
View raw message