View Javadoc
1   /*
2    * Copyright 2013-2016 Brian Thomas Matthews
3    *
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    *     http://www.apache.org/licenses/LICENSE-2.0
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  
17  package com.btmatthews.maven.plugins.ldap;
18  
19  /**
20   * The API used by {@link FormatHandler}, {@link FormatReader} and {@link FormatWriter} implementations to log
21   * information and error messages.
22   *
23   * @author <a href="mailto:brian@btmatthews.com">Brian Matthews</a>
24   * @since 1.2.0
25   */
26  public interface FormatLogger {
27  
28      /**
29       * Write an information message to the log file.
30       *
31       * @param message The message.
32       */
33      void logInfo(String message);
34  
35      /**
36       * Write an error message to the log file.
37       *
38       * @param message The message.
39       */
40      void logError(String message);
41  
42      /**
43       * Write an error message with an exception stack trace to the log file.
44       *
45       * @param message   The message.
46       * @param exception The exception.
47       */
48      void logError(String message, Throwable exception);
49  }