Created
November 14, 2018 11:56
-
-
Save rah003/375c5d2549e2d8fc24296b225d90c950 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Jans-MacBook-Pro:~/projects/gitnolia/modules/imaging/magnolia-imaging had [bugfix/MGNLIMG-210] $ git st | |
# On branch bugfix/MGNLIMG-210 | |
# Your branch is up to date with 'had/bugfix/MGNLIMG-210'. | |
# | |
# Changes not staged for commit: | |
# (use "git add <file>..." to update what will be committed) | |
# (use "git checkout -- <file>..." to discard changes in working directory) | |
# | |
# modified: src/main/java/info/magnolia/imaging/Imaging.java | |
# modified: src/main/java/info/magnolia/imaging/parameters/AbstractJcrWorkspaceAndIdentifierParameterProviderFactory.java | |
# | |
no changes added to commit (use "git add" and/or "git commit -a") | |
Jans-MacBook-Pro:~/projects/gitnolia/modules/imaging/magnolia-imaging had [bugfix/MGNLIMG-210] $ git diff | |
diff --git a/magnolia-imaging/src/main/java/info/magnolia/imaging/Imaging.java b/magnolia-imaging/src/main/java/info/magnolia/imaging/Imaging.java | |
index 2fe674d..de68f7f 100644 | |
--- a/magnolia-imaging/src/main/java/info/magnolia/imaging/Imaging.java | |
+++ b/magnolia-imaging/src/main/java/info/magnolia/imaging/Imaging.java | |
@@ -33,6 +33,11 @@ | |
*/ | |
package info.magnolia.imaging; | |
+import info.magnolia.context.SystemContext; | |
+import info.magnolia.imaging.caching.CachingImageStreamer; | |
+import info.magnolia.imaging.caching.CachingStrategy; | |
+import info.magnolia.objectfactory.annotation.LazySingleton; | |
+ | |
import java.io.IOException; | |
import javax.inject.Inject; | |
@@ -41,10 +46,8 @@ import javax.jcr.LoginException; | |
import javax.jcr.RepositoryException; | |
import javax.jcr.Session; | |
-import info.magnolia.context.SystemContext; | |
-import info.magnolia.imaging.caching.CachingImageStreamer; | |
-import info.magnolia.imaging.caching.CachingStrategy; | |
-import info.magnolia.objectfactory.annotation.LazySingleton; | |
+import org.slf4j.Logger; | |
+import org.slf4j.LoggerFactory; | |
/** | |
* The entry point to Imaging module. | |
@@ -53,6 +56,9 @@ import info.magnolia.objectfactory.annotation.LazySingleton; | |
*/ | |
@LazySingleton | |
public class Imaging { | |
+ | |
+ private static final Logger log = LoggerFactory.getLogger(Imaging.class); | |
+ | |
private final ImagingModule config; | |
private final Provider<SystemContext> contextProvider; | |
@@ -70,6 +76,8 @@ public class Imaging { | |
} | |
final ParameterProviderFactory<ENV, PT> parameterProviderFactory = generator.getParameterProviderFactory(); | |
+ log.debug("Input: " + input); | |
+ log.debug("Factory: " + parameterProviderFactory); | |
final ParameterProvider<PT> p = parameterProviderFactory.newParameterProviderFor(input); | |
final ImageStreamer<PT> streamer = getStreamer(parameterProviderFactory); | |
diff --git a/magnolia-imaging/src/main/java/info/magnolia/imaging/parameters/AbstractJcrWorkspaceAndIdentifierParameterProviderFactory.java b/magnolia-imaging/src/main/java/info/magnolia/imaging/parameters/AbstractJcrWorkspaceAndIdentifierParameterProviderFactory.java | |
index af94755..f2f69ed 100644 | |
--- a/magnolia-imaging/src/main/java/info/magnolia/imaging/parameters/AbstractJcrWorkspaceAndIdentifierParameterProviderFactory.java | |
+++ b/magnolia-imaging/src/main/java/info/magnolia/imaging/parameters/AbstractJcrWorkspaceAndIdentifierParameterProviderFactory.java | |
@@ -46,6 +46,9 @@ import javax.jcr.RepositoryException; | |
import javax.jcr.Session; | |
import javax.servlet.http.HttpServletRequest; | |
+import org.slf4j.Logger; | |
+import org.slf4j.LoggerFactory; | |
+ | |
/** | |
* This class extracts workspace and identifier from the path. | |
* Everything after the identifier is ignored so that one can pass e.g. a properly named filename to the image. | |
@@ -54,11 +57,14 @@ import javax.servlet.http.HttpServletRequest; | |
*/ | |
public abstract class AbstractJcrWorkspaceAndIdentifierParameterProviderFactory<PT> implements ParameterProviderFactory<HttpServletRequest, PT> { | |
+ private static final Logger log = LoggerFactory.getLogger(AbstractJcrWorkspaceAndIdentifierParameterProviderFactory.class); | |
+ | |
private boolean trimExtension = true; | |
@Override | |
public ParameterProvider<PT> newParameterProviderFor(HttpServletRequest request) { | |
final String pathInfo = request.getPathInfo(); | |
+ log.debug("PathInfo: " + pathInfo); | |
if (pathInfo == null) { | |
throw new ImagingRuntimeException(String.format("Can't determine node, no pathInfo is available for uri '%s'", request.getRequestURI())); | |
} | |
Jans-MacBook-Pro:~/projects/gitnolia/modules/imaging/magnolia-imaging had [bugfix/MGNLIMG-210] $ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment