more logging modules for MARMOTTA-390 (configurable logging)
Project: http://git-wip-us.apache.org/repos/asf/marmotta/repo Commit: http://git-wip-us.apache.org/repos/asf/marmotta/commit/3d9163b7 Tree: http://git-wip-us.apache.org/repos/asf/marmotta/tree/3d9163b7 Diff: http://git-wip-us.apache.org/repos/asf/marmotta/diff/3d9163b7 Branch: refs/heads/develop Commit: 3d9163b7fb2846d3fb128514027d3e22ad4b90f2 Parents: e5dd9cf Author: Sebastian Schaffert <[email protected]> Authored: Thu Nov 28 16:36:20 2013 +0100 Committer: Sebastian Schaffert <[email protected]> Committed: Thu Nov 28 16:36:20 2013 +0100 ---------------------------------------------------------------------- .../ldcache/logging/LDCacheLoggingModule.java | 66 +++++++++++++++++++ .../ldcache/logging/LDClientLoggingModule.java | 65 +++++++++++++++++++ .../ldpath/logging/LDPathLoggingModule.java | 66 +++++++++++++++++++ .../reasoner/logging/ReasonerLoggingModule.java | 67 +++++++++++++++++++ .../logging/ZookeeperLoggingModule.java | 68 ++++++++++++++++++++ 5 files changed, 332 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/marmotta/blob/3d9163b7/platform/ldcache/marmotta-ldcache-common/src/main/java/org/apache/marmotta/platform/ldcache/logging/LDCacheLoggingModule.java ---------------------------------------------------------------------- diff --git a/platform/ldcache/marmotta-ldcache-common/src/main/java/org/apache/marmotta/platform/ldcache/logging/LDCacheLoggingModule.java b/platform/ldcache/marmotta-ldcache-common/src/main/java/org/apache/marmotta/platform/ldcache/logging/LDCacheLoggingModule.java new file mode 100644 index 0000000..f0b038c --- /dev/null +++ b/platform/ldcache/marmotta-ldcache-common/src/main/java/org/apache/marmotta/platform/ldcache/logging/LDCacheLoggingModule.java @@ -0,0 +1,66 @@ +package org.apache.marmotta.platform.ldcache.logging; + +import ch.qos.logback.classic.Level; +import com.google.common.collect.ImmutableSet; +import org.apache.marmotta.platform.core.logging.BaseLoggingModule; + +import javax.enterprise.context.ApplicationScoped; +import java.util.Collection; + +/** + * Add file description here! + * + * @author Sebastian Schaffert ([email protected]) + */ +@ApplicationScoped +public class LDCacheLoggingModule extends BaseLoggingModule { + public LDCacheLoggingModule() { + } + + /** + * Return the default (logback) level used by this logging module. Should in most cases be INFO or WARN. + * + * @return + */ + @Override + public Level getDefaultLevel() { + return Level.INFO; + } + + /** + * Return a unique identifier for this logging module. This identifier will e.g. be used in the configuration file + * to store the configuration for this module. For this reason it should only consist of alpha-numeric characters + * plus _ and _. + * + * @return a unique identifier for the module, suitable for use in the configuration file + */ + @Override + public String getId() { + return "ldcache"; + } + + /** + * Return a human-readable name for this logging module. This name is used for displaying information about the + * module to the user, e.g. in a configuration interface. + * + * @return a human-readable name for the module, suitable for displaying in a user interface + */ + @Override + public String getName() { + return "LDCache"; + } + + /** + * Return a collection of packages covered by this logging module. This method should be used to group together + * those packages that conceptually make up the functionality described by the logging module (e.g. "SPARQL"). + * + * @return a collection of package names + */ + @Override + public Collection<String> getPackages() { + return ImmutableSet.of( + "org.apache.marmotta.platform.ldcache", + "org.apache.marmotta.ldcache" + ); + } +} http://git-wip-us.apache.org/repos/asf/marmotta/blob/3d9163b7/platform/ldcache/marmotta-ldcache-common/src/main/java/org/apache/marmotta/platform/ldcache/logging/LDClientLoggingModule.java ---------------------------------------------------------------------- diff --git a/platform/ldcache/marmotta-ldcache-common/src/main/java/org/apache/marmotta/platform/ldcache/logging/LDClientLoggingModule.java b/platform/ldcache/marmotta-ldcache-common/src/main/java/org/apache/marmotta/platform/ldcache/logging/LDClientLoggingModule.java new file mode 100644 index 0000000..a073580 --- /dev/null +++ b/platform/ldcache/marmotta-ldcache-common/src/main/java/org/apache/marmotta/platform/ldcache/logging/LDClientLoggingModule.java @@ -0,0 +1,65 @@ +package org.apache.marmotta.platform.ldcache.logging; + +import ch.qos.logback.classic.Level; +import com.google.common.collect.ImmutableSet; +import org.apache.marmotta.platform.core.logging.BaseLoggingModule; + +import javax.enterprise.context.ApplicationScoped; +import java.util.Collection; + +/** + * Add file description here! + * + * @author Sebastian Schaffert ([email protected]) + */ +@ApplicationScoped +public class LDClientLoggingModule extends BaseLoggingModule { + public LDClientLoggingModule() { + } + + /** + * Return the default (logback) level used by this logging module. Should in most cases be INFO or WARN. + * + * @return + */ + @Override + public Level getDefaultLevel() { + return Level.INFO; + } + + /** + * Return a unique identifier for this logging module. This identifier will e.g. be used in the configuration file + * to store the configuration for this module. For this reason it should only consist of alpha-numeric characters + * plus _ and _. + * + * @return a unique identifier for the module, suitable for use in the configuration file + */ + @Override + public String getId() { + return "ldclient"; + } + + /** + * Return a human-readable name for this logging module. This name is used for displaying information about the + * module to the user, e.g. in a configuration interface. + * + * @return a human-readable name for the module, suitable for displaying in a user interface + */ + @Override + public String getName() { + return "LDClient"; + } + + /** + * Return a collection of packages covered by this logging module. This method should be used to group together + * those packages that conceptually make up the functionality described by the logging module (e.g. "SPARQL"). + * + * @return a collection of package names + */ + @Override + public Collection<String> getPackages() { + return ImmutableSet.of( + "org.apache.marmotta.ldclient" + ); + } +} http://git-wip-us.apache.org/repos/asf/marmotta/blob/3d9163b7/platform/marmotta-ldpath/src/main/java/org/apache/marmotta/platform/ldpath/logging/LDPathLoggingModule.java ---------------------------------------------------------------------- diff --git a/platform/marmotta-ldpath/src/main/java/org/apache/marmotta/platform/ldpath/logging/LDPathLoggingModule.java b/platform/marmotta-ldpath/src/main/java/org/apache/marmotta/platform/ldpath/logging/LDPathLoggingModule.java new file mode 100644 index 0000000..4d6247c --- /dev/null +++ b/platform/marmotta-ldpath/src/main/java/org/apache/marmotta/platform/ldpath/logging/LDPathLoggingModule.java @@ -0,0 +1,66 @@ +package org.apache.marmotta.platform.ldpath.logging; + +import ch.qos.logback.classic.Level; +import com.google.common.collect.ImmutableSet; +import org.apache.marmotta.platform.core.logging.BaseLoggingModule; + +import javax.enterprise.context.ApplicationScoped; +import java.util.Collection; + +/** + * Add file description here! + * + * @author Sebastian Schaffert ([email protected]) + */ +@ApplicationScoped +public class LDPathLoggingModule extends BaseLoggingModule { + public LDPathLoggingModule() { + } + + /** + * Return the default (logback) level used by this logging module. Should in most cases be INFO or WARN. + * + * @return + */ + @Override + public Level getDefaultLevel() { + return Level.INFO; + } + + /** + * Return a unique identifier for this logging module. This identifier will e.g. be used in the configuration file + * to store the configuration for this module. For this reason it should only consist of alpha-numeric characters + * plus _ and _. + * + * @return a unique identifier for the module, suitable for use in the configuration file + */ + @Override + public String getId() { + return "ldpath"; + } + + /** + * Return a human-readable name for this logging module. This name is used for displaying information about the + * module to the user, e.g. in a configuration interface. + * + * @return a human-readable name for the module, suitable for displaying in a user interface + */ + @Override + public String getName() { + return "LDPath"; + } + + /** + * Return a collection of packages covered by this logging module. This method should be used to group together + * those packages that conceptually make up the functionality described by the logging module (e.g. "SPARQL"). + * + * @return a collection of package names + */ + @Override + public Collection<String> getPackages() { + return ImmutableSet.of( + "org.apache.marmotta.platform.ldpath", + "org.apache.marmotta.ldpath" + ); + } +} http://git-wip-us.apache.org/repos/asf/marmotta/blob/3d9163b7/platform/marmotta-reasoner-kiwi/src/main/java/org/apache/marmotta/platform/reasoner/logging/ReasonerLoggingModule.java ---------------------------------------------------------------------- diff --git a/platform/marmotta-reasoner-kiwi/src/main/java/org/apache/marmotta/platform/reasoner/logging/ReasonerLoggingModule.java b/platform/marmotta-reasoner-kiwi/src/main/java/org/apache/marmotta/platform/reasoner/logging/ReasonerLoggingModule.java new file mode 100644 index 0000000..11b8206 --- /dev/null +++ b/platform/marmotta-reasoner-kiwi/src/main/java/org/apache/marmotta/platform/reasoner/logging/ReasonerLoggingModule.java @@ -0,0 +1,67 @@ +package org.apache.marmotta.platform.reasoner.logging; + +import ch.qos.logback.classic.Level; +import com.google.common.collect.ImmutableSet; +import org.apache.marmotta.platform.core.logging.BaseLoggingModule; + +import javax.enterprise.context.ApplicationScoped; +import java.util.Collection; + +/** + * Add file description here! + * + * @author Sebastian Schaffert ([email protected]) + */ +@ApplicationScoped +public class ReasonerLoggingModule extends BaseLoggingModule { + + public ReasonerLoggingModule() { + } + + /** + * Return the default (logback) level used by this logging module. Should in most cases be INFO or WARN. + * + * @return + */ + @Override + public Level getDefaultLevel() { + return Level.INFO; + } + + /** + * Return a unique identifier for this logging module. This identifier will e.g. be used in the configuration file + * to store the configuration for this module. For this reason it should only consist of alpha-numeric characters + * plus _ and _. + * + * @return a unique identifier for the module, suitable for use in the configuration file + */ + @Override + public String getId() { + return "kiwi_reasoner"; + } + + /** + * Return a human-readable name for this logging module. This name is used for displaying information about the + * module to the user, e.g. in a configuration interface. + * + * @return a human-readable name for the module, suitable for displaying in a user interface + */ + @Override + public String getName() { + return "KiWi Reasoner"; + } + + /** + * Return a collection of packages covered by this logging module. This method should be used to group together + * those packages that conceptually make up the functionality described by the logging module (e.g. "SPARQL"). + * + * @return a collection of package names + */ + @Override + public Collection<String> getPackages() { + return ImmutableSet.of( + "org.apache.marmotta.platform.reasoner", + "org.apache.marmotta.kiwi.reasoner" + ); + } +} http://git-wip-us.apache.org/repos/asf/marmotta/blob/3d9163b7/platform/marmotta-zookeeper/src/main/java/org/apache/marmotta/platform/zookeeper/logging/ZookeeperLoggingModule.java ---------------------------------------------------------------------- diff --git a/platform/marmotta-zookeeper/src/main/java/org/apache/marmotta/platform/zookeeper/logging/ZookeeperLoggingModule.java b/platform/marmotta-zookeeper/src/main/java/org/apache/marmotta/platform/zookeeper/logging/ZookeeperLoggingModule.java new file mode 100644 index 0000000..5c8d357 --- /dev/null +++ b/platform/marmotta-zookeeper/src/main/java/org/apache/marmotta/platform/zookeeper/logging/ZookeeperLoggingModule.java @@ -0,0 +1,68 @@ +package org.apache.marmotta.platform.zookeeper.logging; + +import ch.qos.logback.classic.Level; +import com.google.common.collect.ImmutableSet; +import org.apache.marmotta.platform.core.logging.BaseLoggingModule; + +import javax.enterprise.context.ApplicationScoped; +import java.util.Collection; + +/** + * Add file description here! + * + * @author Sebastian Schaffert ([email protected]) + */ +@ApplicationScoped +public class ZookeeperLoggingModule extends BaseLoggingModule { + + public ZookeeperLoggingModule() { + } + + /** + * Return the default (logback) level used by this logging module. Should in most cases be INFO or WARN. + * + * @return + */ + @Override + public Level getDefaultLevel() { + return Level.WARN; + } + + /** + * Return a unique identifier for this logging module. This identifier will e.g. be used in the configuration file + * to store the configuration for this module. For this reason it should only consist of alpha-numeric characters + * plus _ and _. + * + * @return a unique identifier for the module, suitable for use in the configuration file + */ + @Override + public String getId() { + return "zookeeper"; + } + + /** + * Return a human-readable name for this logging module. This name is used for displaying information about the + * module to the user, e.g. in a configuration interface. + * + * @return a human-readable name for the module, suitable for displaying in a user interface + */ + @Override + public String getName() { + return "Zookeeper"; + } + + /** + * Return a collection of packages covered by this logging module. This method should be used to group together + * those packages that conceptually make up the functionality described by the logging module (e.g. "SPARQL"). + * + * @return a collection of package names + */ + @Override + public Collection<String> getPackages() { + return ImmutableSet.of( + "org.apache.marmotta.platform.zookeeper", + "at.salzburgresearch.nodekeeper", + "org.apache.zookeeper" + ); + } +}
