Permalink
Browse files

NEXUS-5511: Make repo ID be in all messages.

  • Loading branch information...
cstamas committed Apr 30, 2013
1 parent 7094ee2 commit 8d79e5ab246d8fa49bc681c40328e8cfdffb6d50
@@ -48,8 +48,8 @@
import org.sonatype.nexus.proxy.item.uid.IsHiddenAttribute;
import org.sonatype.nexus.proxy.maven.EvictUnusedMavenItemsWalkerProcessor.EvictUnusedMavenItemsWalkerFilter;
import org.sonatype.nexus.proxy.maven.packaging.ArtifactPackagingMapper;
-import org.sonatype.nexus.proxy.maven.routing.ProxyRequestFilter;
import org.sonatype.nexus.proxy.maven.routing.Manager;
+import org.sonatype.nexus.proxy.maven.routing.ProxyRequestFilter;
import org.sonatype.nexus.proxy.repository.AbstractProxyRepository;
import org.sonatype.nexus.proxy.repository.DefaultRepositoryKind;
import org.sonatype.nexus.proxy.repository.HostedRepository;
@@ -470,10 +470,8 @@ protected void shouldTryRemote( final ResourceStoreRequest request )
final boolean proxyFilterAllowed = getProxyRequestFilter().allowed( this, request );
if ( !proxyFilterAllowed )
{
- getLogger().debug( "Automatic routing filter rejected remote request for path {} in {}.",
- request.getRequestPath(), this );
throw new ItemNotFoundException( ItemNotFoundException.reasonFor( request, this,
- "Automatic routing filter rejected remote request for path %s in %s", request.getRequestPath(),
+ "Automatic routing filter rejected remote request for path %s from %s", request.getRequestPath(),
this ) );
}
}
@@ -12,6 +12,8 @@
*/
package org.sonatype.nexus.proxy.repository;
+import static org.sonatype.nexus.proxy.ItemNotFoundException.reasonFor;
+
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collection;
@@ -74,8 +76,6 @@
import org.sonatype.nexus.util.NumberSequence;
import org.sonatype.nexus.util.SystemPropertiesHelper;
-import static org.sonatype.nexus.proxy.ItemNotFoundException.reasonFor;
-
/**
* Adds the proxying capability to a simple repository. The proxying will happen only if reposiory has remote storage!
* So, this implementation is used in both "simple" repository cases: hosted and proxy, but in 1st case there is no
@@ -1158,12 +1158,12 @@ protected void shouldTryRemote( final ResourceStoreRequest request )
if ( request.isRequestLocalOnly() )
{
throw new ItemNotFoundException( ItemNotFoundException.reasonFor( request, this,
- "Request is marked as local-only, remote access not allowed" ) );
+ "Request is marked as local-only, remote access not allowed from %s", this ) );
}
if ( getProxyMode() != null && !getProxyMode().shouldProxy() )
{
throw new ItemNotFoundException( ItemNotFoundException.reasonFor( request, this,
- "Repository proxy-mode is %s, remote access not allowed", getProxyMode() ) );
+ "Repository proxy-mode is %s, remote access not allowed from %s", getProxyMode(), this ) );
}
}

0 comments on commit 8d79e5a

Please sign in to comment.