Skip to content

Commit

Permalink
build: Use SLF4j for logging (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
rgriffith authored Mar 17, 2022
2 parents 4a10a1c + cd257ab commit c00f204
Show file tree
Hide file tree
Showing 14 changed files with 152 additions and 88 deletions.
8 changes: 8 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 25 additions & 0 deletions .idea/jarRepositories.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>com.hannonhill.commons</groupId>
<artifactId>hannonhill-commons</artifactId>
<version>1.3.5</version>
<version>1.5.0</version>
<description>POM was created from install:install-file</description>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
<groupId>com.hannonhill.commons</groupId>
<artifactId>hannonhill-commons</artifactId>
<versioning>
<release>1.3.5</release>
<release>1.5.0</release>
<versions>
<version>1.3.5</version>
<version>1.5.0</version>
</versions>
<lastUpdated>20170908141814</lastUpdated>
<lastUpdated>20220211141031</lastUpdated>
</versioning>
</metadata>
127 changes: 66 additions & 61 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,63 +1,68 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>Asset-Factory-Plugins</groupId>
<artifactId>Asset-Factory-Plugins</artifactId>
<version>8.17</version>
<name>Asset Factory Plugins</name>
<description>Custom Asset Factory plugins for Cascade Server.</description>
<build>
<sourceDirectory>src</sourceDirectory>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.6.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
<resources>
<resource>
<directory>src</directory>
<includes>
<include>**/*.properties</include>
</includes>
</resource>
</resources>
</build>
<repositories>
<repository>
<id>Local Project Repository</id>
<url>file://${project.basedir}/lib</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.14</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.hannonhill.cascade</groupId>
<artifactId>cascade-api</artifactId>
<version>8.17</version>
</dependency>
<dependency>
<groupId>com.cms.assetfactory</groupId>
<artifactId>assetfactory-plugins</artifactId>
<version>8.17</version>
</dependency>
<dependency>
<groupId>com.hannonhill.commons</groupId>
<artifactId>hannonhill-commons</artifactId>
<version>1.3.5</version>
</dependency>
<dependency>
<groupId>org.imgscalr</groupId>
<artifactId>imgscalr-lib</artifactId>
<version>4.2</version>
</dependency>
</dependencies>
<modelVersion>4.0.0</modelVersion>
<groupId>Asset-Factory-Plugins</groupId>
<artifactId>Asset-Factory-Plugins</artifactId>
<version>8.17</version>
<name>Asset Factory Plugins</name>
<description>Custom Asset Factory plugins for Cascade Server.</description>
<build>
<sourceDirectory>src</sourceDirectory>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.6.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
<resources>
<resource>
<directory>src</directory>
<includes>
<include>**/*.properties</include>
</includes>
</resource>
</resources>
</build>
<repositories>
<repository>
<id>Local Project Repository</id>
<url>file://${project.basedir}/lib</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.36</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-nop</artifactId>
<version>1.7.36</version>
</dependency>
<dependency>
<groupId>com.hannonhill.cascade</groupId>
<artifactId>cascade-api</artifactId>
<version>8.17</version>
</dependency>
<dependency>
<groupId>com.cms.assetfactory</groupId>
<artifactId>assetfactory-plugins</artifactId>
<version>8.17</version>
</dependency>
<dependency>
<groupId>com.hannonhill.commons</groupId>
<artifactId>hannonhill-commons</artifactId>
<version>1.5.0</version>
</dependency>
<dependency>
<groupId>org.imgscalr</groupId>
<artifactId>imgscalr-lib</artifactId>
<version>4.2</version>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

import javax.imageio.ImageIO;

import org.apache.log4j.Logger;
import org.imgscalr.Scalr;
import org.imgscalr.Scalr.Method;
import org.imgscalr.Scalr.Mode;
Expand All @@ -31,6 +30,8 @@
import com.hannonhill.cascade.model.dom.identifier.EntityTypes;
import com.hannonhill.commons.util.FileExtension;
import com.hannonhill.commons.util.StringUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
* Provides the ability to resize an image upon creation to a given
Expand All @@ -41,7 +42,7 @@
*/
public class CreateResizedImagesPlugin extends BaseAssetFactoryPlugin
{
private static final Logger LOG = getLogger(CreateResizedImagesPlugin.class);
private static final Logger LOG = LoggerFactory.getLogger(CreateResizedImagesPlugin.class);

private static final String DESCRIPTION_KEY = "plugin.assetfactory.createresizedimages.description";
private static final String NAME_KEY = "plugin.assetfactory.createresizedimages.name";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
import java.util.HashMap;
import java.util.Map;

import org.apache.log4j.Logger;

import com.cms.assetfactory.BaseAssetFactoryPlugin;
import com.cms.assetfactory.PluginException;
import com.hannonhill.cascade.api.asset.admin.AssetFactory;
import com.hannonhill.cascade.api.asset.home.FolderContainedAsset;
import com.hannonhill.cascade.model.dom.identifier.EntityTypes;
import com.hannonhill.commons.util.StringUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
* This plugin is run to restrict creation of a Folder asset based on whether the asset's name matches the given regular
Expand All @@ -21,7 +21,7 @@
*/
public class FriendlyFolderNamePlugin extends BaseAssetFactoryPlugin
{
private static final Logger LOG = getLogger(FriendlyFolderNamePlugin.class);
private static final Logger LOG = LoggerFactory.getLogger(FriendlyFolderNamePlugin.class);

private static final String DESCRIPTION_KEY = "plugin.assetfactory.friendlyfoldername.description";
private static final String NAME_KEY = "plugin.assetfactory.friendlyfoldername.name";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,27 +1,21 @@
package com.hannonhill.cascade.plugin.assetfactory;

import java.util.Date;
import java.util.HashMap;
import java.util.Map;

import org.apache.log4j.Logger;

import com.cms.assetfactory.BaseAssetFactoryPlugin;
import com.cms.assetfactory.PluginException;
import com.hannonhill.cascade.api.asset.admin.AssetFactory;
import com.hannonhill.cascade.api.asset.common.Identifier;
import com.hannonhill.cascade.api.asset.common.Metadata;
import com.hannonhill.cascade.api.asset.home.FolderContainedAsset;
import com.hannonhill.cascade.api.asset.home.MetadataAwareAsset;
import com.hannonhill.cascade.api.operation.Publish;
import com.hannonhill.cascade.api.operation.Read;
import com.hannonhill.cascade.api.operation.exception.ModelOperationException;
import com.hannonhill.cascade.api.operation.exception.OperationValidationException;
import com.hannonhill.cascade.api.operation.result.PublishOperationResult;
import com.hannonhill.cascade.api.operation.result.ReadOperationResult;
import com.hannonhill.cascade.model.dom.identifier.EntityType;
import com.hannonhill.cascade.model.dom.identifier.EntityTypes;
import com.hannonhill.commons.util.StringUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.HashMap;
import java.util.Map;

/**
* This plugin is run to automatically set the review date of an asset before the initial
Expand All @@ -33,7 +27,7 @@
*/
public class PublishPublishSetOnCreatePlugin extends BaseAssetFactoryPlugin
{
private static final Logger LOG = getLogger(PublishPublishSetOnCreatePlugin.class);
private static final Logger LOG = LoggerFactory.getLogger(PublishPublishSetOnCreatePlugin.class);

private static final String DESCRIPTION_KEY = "plugin.assetfactory.publishpublishsetoncreate.description";
private static final String NAME_KEY = "plugin.assetfactory.publishpublishsetoncreate.name";
Expand Down Expand Up @@ -95,9 +89,9 @@ public void doPluginActionPost(AssetFactory factory, FolderContainedAsset asset)
LOG.debug("Attempting to publish Publish Set: " + publishSetId);
publish.perform();
} catch (ModelOperationException e) {
LOG.debug("ModelOperationException: "+e.getMessage());
LOG.debug("ModelOperationException: ", e);
} catch (OperationValidationException e) {
LOG.debug("OperationValidationException: "+e.getMessage());
LOG.debug("OperationValidationException: ", e);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
import java.util.HashMap;
import java.util.Map;

import org.apache.log4j.Logger;

import com.cms.assetfactory.BaseAssetFactoryPlugin;
import com.cms.assetfactory.PluginException;
import com.hannonhill.cascade.api.asset.admin.AssetFactory;
import com.hannonhill.cascade.api.asset.common.Metadata;
import com.hannonhill.cascade.api.asset.home.FolderContainedAsset;
import com.hannonhill.cascade.api.asset.home.MetadataAwareAsset;
import com.hannonhill.commons.util.StringUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
* This plugin is run to automatically set the review date of an asset before the initial
Expand All @@ -24,7 +24,7 @@
*/
public class SetReviewDatePlugin extends BaseAssetFactoryPlugin
{
private static final Logger LOG = getLogger(SetReviewDatePlugin.class);
private static final Logger LOG = LoggerFactory.getLogger(SetReviewDatePlugin.class);

private static final String DESCRIPTION_KEY = "plugin.assetfactory.setreviewdate.description";
private static final String NAME_KEY = "plugin.assetfactory.setreviewdate.name";
Expand Down

0 comments on commit c00f204

Please sign in to comment.