View Javadoc
1   /**************************************************************************
2    *
3    * Copyright (c) 2015-2020 Yawg project contributors.
4    *
5    **************************************************************************/
6   
7   package com.varmateo.yawg.logging;
8   
9   
10  /**
11   * A simple logger.
12   */
13  
14  public interface Log {
15  
16  
17      /**
18       * Log a WARNING message.
19       *
20       * @param msg The message to be logged.
21       */
22      void warning(String msg);
23  
24  
25      /**
26       * Log a WARNING message.
27       *
28       * @param msg The log message format.
29       *
30       * @param fmtArgs Formating arguments used when generating the
31       * actual message that is logged.
32       */
33      void warning(
34              String    msg,
35              Object... fmtArgs);
36  
37  
38      /**
39       * Log a WARNING message.
40       *
41       * @param error The exception associated with the log message.
42       *
43       * @param msg The log message format.
44       *
45       * @param fmtArgs Formating arguments used when generating the
46       * actual message that is logged.
47       */
48      void warning(
49              Throwable error,
50              String    msg,
51              Object... fmtArgs);
52  
53  
54      /**
55       * Log a INFO message.
56       *
57       * @param msg The message to be logged.
58       */
59      void info(String msg);
60  
61  
62      /**
63       * Log a INFO message.
64       *
65       * @param msg The log message format.
66       *
67       * @param fmtArgs Formating arguments used when generating the
68       * actual message that is logged.
69       */
70      void info(
71              String    msg,
72              Object... fmtArgs);
73  
74  
75      /**
76       * Log a DEBUG message.
77       *
78       * @param msg The message to be logged.
79       */
80      void debug(String msg);
81  
82  
83      /**
84       * Log a DEBUG message.
85       *
86       * @param msg The log message format.
87       *
88       * @param fmtArgs Formating arguments used when generating the
89       * actual message that is logged.
90       */
91      void debug(
92              String    msg,
93              Object... fmtArgs);
94  
95  }