1 /*
2 * This file is part of AceLogger.
3 *
4 * AceLogger is free software: you can redistribute it and/or modify it under the terms of the GNU
5 * Lesser General Public License as published by the Free Software Foundation, either version 3 of
6 * the License, or (at your option) any later version.
7 *
8 * AceLogger is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
9 * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
10 * Lesser General Public License for more details.
11 *
12 * You should have received a copy of the GNU Lesser General Public License along with AceLogger.
13 * If not, see <http://www.gnu.org/licenses/lgpl-3.0.html>.
14 */
15 package net.sourceforge.acelogger.formatter;
16
17 import net.sourceforge.acelogger.Identifiable;
18 import net.sourceforge.acelogger.LogEvent;
19
20 /**
21 * A formatting interface that provides the methods needed to format log calls to it's string
22 * representation, abstracting the configuration to the framework.
23 *
24 * @author Zardi (https://sourceforge.net/users/daniel_zardi)
25 * @version 1.0.0
26 * @since 1.0.0
27 */
28 public interface Formatter extends Identifiable {
29
30 /**
31 * A formatter suitable to indicate that no formatter was found.
32 */
33 public static final Formatter NO_FORMATTER = new EmptyFormatter("formatter.none");
34
35 /**
36 * Formats a log call to it's string representation.
37 *
38 * @param call
39 * The log call, containing the message, parameters and log location information.
40 * @return The string representation of the log call.
41 * @since 1.0.0
42 */
43 public String formatLogCall(LogEvent call);
44
45 }