001/* 002 * Licensed to the Apache Software Foundation (ASF) under one 003 * or more contributor license agreements. See the NOTICE file 004 * distributed with this work for additional information 005 * regarding copyright ownership. The ASF licenses this file 006 * to you under the Apache License, Version 2.0 (the 007 * "License"); you may not use this file except in compliance 008 * with the License. You may obtain a copy of the License at 009 * 010 * http://www.apache.org/licenses/LICENSE-2.0 011 * 012 * Unless required by applicable law or agreed to in writing, 013 * software distributed under the License is distributed on an 014 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 015 * KIND, either express or implied. See the License for the 016 * specific language governing permissions and limitations 017 * under the License. 018 */ 019package org.eclipse.aether.spi.log; 020 021/** 022 * A simple logger to facilitate emission of diagnostic messages. In general, unrecoverable errors should be reported 023 * via exceptions and informational notifications should be reported via events, hence this logger interface focuses on 024 * support for tracing. 025 * 026 * @deprecated Use SLF4J instead 027 */ 028@Deprecated 029public interface Logger { 030 031 /** 032 * Indicates whether debug logging is enabled. 033 * 034 * @return {@code true} if debug logging is enabled, {@code false} otherwise. 035 */ 036 boolean isDebugEnabled(); 037 038 /** 039 * Emits the specified message. 040 * 041 * @param msg The message to log, must not be {@code null}. 042 */ 043 void debug(String msg); 044 045 /** 046 * Emits the specified message along with a stack trace of the given exception. 047 * 048 * @param msg The message to log, must not be {@code null}. 049 * @param error The exception to log, may be {@code null}. 050 */ 051 void debug(String msg, Throwable error); 052 053 /** 054 * Indicates whether warn logging is enabled. 055 * 056 * @return {@code true} if warn logging is enabled, {@code false} otherwise. 057 */ 058 boolean isWarnEnabled(); 059 060 /** 061 * Emits the specified message. 062 * 063 * @param msg The message to log, must not be {@code null}. 064 */ 065 void warn(String msg); 066 067 /** 068 * Emits the specified message along with a stack trace of the given exception. 069 * 070 * @param msg The message to log, must not be {@code null}. 071 * @param error The exception to log, may be {@code null}. 072 */ 073 void warn(String msg, Throwable error); 074}