28
28
29
29
import org .slf4j .Marker ;
30
30
31
+ import javax .annotation .CheckReturnValue ;
32
+
31
33
/**
32
34
* This is the main interface in slf4j's fluent API for creating
33
35
* {@link org.slf4j.event.LoggingEvent logging events}.
@@ -42,6 +44,7 @@ public interface LoggingEventBuilder {
42
44
* @param cause a throwable
43
45
* @return a LoggingEventBuilder, usually <b>this</b>.
44
46
*/
47
+ @ CheckReturnValue
45
48
LoggingEventBuilder setCause (Throwable cause );
46
49
47
50
/**
@@ -50,6 +53,7 @@ public interface LoggingEventBuilder {
50
53
* @param marker a Marker instance to add.
51
54
* @return a LoggingEventBuilder, usually <b>this</b>.
52
55
*/
56
+ @ CheckReturnValue
53
57
LoggingEventBuilder addMarker (Marker marker );
54
58
55
59
/**
@@ -58,6 +62,7 @@ public interface LoggingEventBuilder {
58
62
* @param p an Object to add.
59
63
* @return a LoggingEventBuilder, usually <b>this</b>.
60
64
*/
65
+ @ CheckReturnValue
61
66
LoggingEventBuilder addArgument (Object p );
62
67
63
68
/**
@@ -66,6 +71,7 @@ public interface LoggingEventBuilder {
66
71
* @param objectSupplier an Object supplier to add.
67
72
* @return a LoggingEventBuilder, usually <b>this</b>.
68
73
*/
74
+ @ CheckReturnValue
69
75
LoggingEventBuilder addArgument (Supplier <?> objectSupplier );
70
76
71
77
@@ -76,6 +82,7 @@ public interface LoggingEventBuilder {
76
82
* @param value the value of the key value pair.
77
83
* @return a LoggingEventBuilder, usually <b>this</b>.
78
84
*/
85
+ @ CheckReturnValue
79
86
LoggingEventBuilder addKeyValue (String key , Object value );
80
87
81
88
/**
@@ -85,13 +92,15 @@ public interface LoggingEventBuilder {
85
92
* @param valueSupplier a supplier of a value for the key value pair.
86
93
* @return a LoggingEventBuilder, usually <b>this</b>.
87
94
*/
95
+ @ CheckReturnValue
88
96
LoggingEventBuilder addKeyValue (String key , Supplier <Object > valueSupplier );
89
97
90
98
/**
91
99
* Sets the message of the logging event.
92
100
*
93
101
* @since 2.0.0-beta0
94
102
*/
103
+ @ CheckReturnValue
95
104
LoggingEventBuilder setMessage (String message );
96
105
97
106
/**
@@ -100,6 +109,7 @@ public interface LoggingEventBuilder {
100
109
* @param messageSupplier supplies a String to be used as the message for the event
101
110
* @since 2.0.0-beta0
102
111
*/
112
+ @ CheckReturnValue
103
113
LoggingEventBuilder setMessage (Supplier <String > messageSupplier );
104
114
105
115
/**
0 commit comments