|
23 | 23 | */
|
24 | 24 | public interface Logger
|
25 | 25 | {
|
| 26 | + /** |
| 27 | + * Logs errors from this driver |
| 28 | + * @param message the error message |
| 29 | + * @param cause the cause of the error |
| 30 | + */ |
26 | 31 | void error( String message, Throwable cause );
|
27 | 32 |
|
| 33 | + /** |
| 34 | + * Logs information from the driver |
| 35 | + * @param message the information message |
| 36 | + * @param params parameters used in the information message |
| 37 | + */ |
28 | 38 | void info( String message, Object... params );
|
29 | 39 |
|
| 40 | + /** |
| 41 | + * Logs warnings that happened during using the driver |
| 42 | + * @param message the warning message |
| 43 | + * @param params parameters used in the warning message |
| 44 | + */ |
30 | 45 | void warn( String message, Object... params );
|
31 | 46 |
|
| 47 | + /** |
| 48 | + * Logs bolt messages sent and received by this driver. |
| 49 | + * It is only enabled when {@link Logger#isDebugEnabled()} returns {@code True}. |
| 50 | + * This logging level generates a lot of log entries. |
| 51 | + * @param message the bolt message |
| 52 | + * @param params parameters used in generating the bolt message |
| 53 | + */ |
32 | 54 | void debug( String message, Object... params );
|
33 | 55 |
|
| 56 | + /** |
| 57 | + * Logs binary sent and received by this driver. |
| 58 | + * It is only enabled when {@link Logger#isTraceEnabled()} returns {@code True}. |
| 59 | + * This logging level generates huge amount of log entries. |
| 60 | + * @param message the bolt message in hex |
| 61 | + * @param params parameters used in generating the hex message |
| 62 | + */ |
34 | 63 | void trace( String message, Object... params );
|
35 | 64 |
|
| 65 | + /** |
| 66 | + * Return true if the trace logging level is enabled. |
| 67 | + * @see Logger#trace(String, Object...) |
| 68 | + * @return true if the trace logging level is enabled. |
| 69 | + */ |
36 | 70 | boolean isTraceEnabled();
|
37 | 71 |
|
| 72 | + /** |
| 73 | + * Return true if the debug level is enabled. |
| 74 | + * @see Logger#debug(String, Object...) |
| 75 | + * @return true if the debug level is enabled. |
| 76 | + */ |
38 | 77 | boolean isDebugEnabled();
|
39 | 78 | }
|
0 commit comments