1 package org.apache.archiva.maven.proxy;
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance
9 * with the License. You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing,
13 * software distributed under the License is distributed on an
14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 * KIND, either express or implied. See the License for the
16 * specific language governing permissions and limitations
20 import org.apache.maven.wagon.events.TransferEvent;
21 import org.apache.maven.wagon.events.TransferListener;
22 import org.slf4j.Logger;
23 import org.slf4j.LoggerFactory;
26 * @author Olivier Lamy
29 public class DebugTransferListener
30 implements TransferListener
32 private Logger log = LoggerFactory.getLogger( getClass() );
35 public void transferInitiated( TransferEvent transferEvent )
37 log.debug( "transferInitiated for resource {} on repository url {}", transferEvent.getResource().getName(),
38 transferEvent.getWagon().getRepository().getUrl() );
42 public void transferStarted( TransferEvent transferEvent )
44 log.debug( "transferStarted for resource {} on repository url {}", transferEvent.getResource().getName(),
45 transferEvent.getWagon().getRepository().getUrl() );
49 public void transferProgress( TransferEvent transferEvent, byte[] bytes, int i )
51 log.debug( "transferProgress for resource {} on repository url {}", transferEvent.getResource().getName(),
52 transferEvent.getWagon().getRepository().getUrl() );
56 public void transferCompleted( TransferEvent transferEvent )
58 log.debug( "transferCompleted for resource {} on repository url {}", transferEvent.getResource().getName(),
59 transferEvent.getWagon().getRepository().getUrl() );
63 public void transferError( TransferEvent transferEvent )
65 log.debug( "transferError for resource {} on repository url {}", transferEvent.getResource().getName(),
66 transferEvent.getWagon().getRepository().getUrl(), transferEvent.getException() );
70 public void debug( String s )
72 log.debug( "wagon debug {}", s );