1 /* 2 * Licensed to the Apache Software Foundation (ASF) under one or more 3 * contributor license agreements. See the NOTICE file distributed with 4 * this work for additional information regarding copyright ownership. 5 * The ASF licenses this file to You under the Apache license, Version 2.0 6 * (the "License"); you may not use this file except in compliance with 7 * the License. You may obtain a copy of the License at 8 * 9 * http://www.apache.org/licenses/LICENSE-2.0 10 * 11 * Unless required by applicable law or agreed to in writing, software 12 * distributed under the License is distributed on an "AS IS" BASIS, 13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 * See the license for the specific language governing permissions and 15 * limitations under the license. 16 */ 17 package org.apache.logging.log4j; 18 19 import org.apache.logging.log4j.message.EntryMessage; 20 import org.apache.logging.log4j.message.Message; 21 import org.apache.logging.log4j.message.MessageFactory; 22 import org.apache.logging.log4j.message.MessageFactory2; 23 import org.apache.logging.log4j.util.MessageSupplier; 24 import org.apache.logging.log4j.util.Supplier; 25 26 /** 27 * This is the central interface in the log4j package. Most logging operations, except configuration, are done through 28 * this interface. 29 * 30 * <p> 31 * The canonical way to obtain a Logger for a class is through {@link LogManager#getLogger()}. Typically, each class 32 * gets its own Logger named after its fully qualified class name (the default Logger name when obtained through the 33 * {@link LogManager#getLogger()} method). Thus, the simplest way to use this would be like so: 34 * </p> 35 * 36 * <pre> 37 * public class MyClass { 38 * private static final Logger LOGGER = LogManager.getLogger(); 39 * // ... 40 * } 41 * </pre> 42 * <p> 43 * For ease of filtering, searching, sorting, etc., it is generally a good idea to create Loggers for each class rather 44 * than sharing Loggers. Instead, {@link Marker Markers} should be used for shared, filterable identification. 45 * </p> 46 * <p> 47 * For service provider implementations, it is recommended to extend the 48 * {@link org.apache.logging.log4j.spi.AbstractLogger} class rather than implementing this interface directly. 49 * </p> 50 * 51 * Since 2.4, methods have been added to the {@code Logger} interface to support lambda expressions. The new methods 52 * allow client code to lazily log messages without explicitly checking if the requested log level is enabled. For 53 * example, previously one would write: 54 * 55 * <pre> 56 * // pre-Java 8 style optimization: explicitly check the log level 57 * // to make sure the expensiveOperation() method is only called if necessary 58 * if (logger.isTraceEnabled()) { 59 * logger.trace("Some long-running operation returned {}", expensiveOperation()); 60 * } 61 * </pre> 62 * <p> 63 * With Java 8, the same effect can be achieved with a lambda expression: 64 * 65 * <pre> 66 * // Java-8 style optimization: no need to explicitly check the log level: 67 * // the lambda expression is not evaluated if the TRACE level is not enabled 68 * logger.trace("Some long-running operation returned {}", () -> expensiveOperation()); 69 * </pre> 70 */ 71 public interface Logger { 72 73 /** 74 * Logs an exception or error that has been caught to a specific logging level. 75 * 76 * @param level The logging Level. 77 * @param t The Throwable. 78 */ 79 void catching(Level level, Throwable t); 80 81 /** 82 * Logs an exception or error that has been caught. Normally, one may wish to provide additional information with an 83 * exception while logging it; in these cases, one would not use this method. In other cases where simply logging 84 * the fact that an exception was swallowed somewhere (e.g., at the top of the stack trace in a {@code main()} 85 * method), this method is ideal for it. 86 * 87 * @param t The Throwable. 88 */ 89 void catching(Throwable t); 90 91 /** 92 * Logs a message with the specific Marker at the {@link Level#DEBUG DEBUG} level. 93 * 94 * @param marker the marker data specific to this log statement 95 * @param msg the message string to be logged 96 */ 97 void debug(Marker marker, Message msg); 98 99 /** 100 * Logs a message with the specific Marker at the {@link Level#DEBUG DEBUG} level. 101 * 102 * @param marker the marker data specific to this log statement 103 * @param msg the message string to be logged 104 * @param t A Throwable or null. 105 */ 106 void debug(Marker marker, Message msg, Throwable t); 107 108 /** 109 * Logs a message which is only to be constructed if the logging level is the {@link Level#DEBUG DEBUG} level with 110 * the specified Marker. The {@code MessageSupplier} may or may not use the {@link MessageFactory} to construct the 111 * {@code Message}. 112 * 113 * @param marker the marker data specific to this log statement 114 * @param msgSupplier A function, which when called, produces the desired log message. 115 * @since 2.4 116 * @deprecated Deprecated in 2.6, use the {@link Supplier} version of this API instead. 117 */ 118 @Deprecated 119 void debug(Marker marker, MessageSupplier msgSupplier); 120 121 /** 122 * Logs a message (only to be constructed if the logging level is the {@link Level#DEBUG DEBUG} level) with the 123 * specified Marker and including the stack trace of the {@link Throwable} <code>t</code> passed as parameter. The 124 * {@code MessageSupplier} may or may not use the {@link MessageFactory} to construct the {@code Message}. 125 * 126 * @param marker the marker data specific to this log statement 127 * @param msgSupplier A function, which when called, produces the desired log message. 128 * @param t A Throwable or null. 129 * @since 2.4 130 * @deprecated Deprecated in 2.6, use the {@link Supplier} version of this API instead. 131 */ 132 @Deprecated 133 void debug(Marker marker, MessageSupplier msgSupplier, Throwable t); 134 135 /** 136 * Logs a message CharSequence with the {@link Level#DEBUG DEBUG} level. 137 * 138 * @param marker the marker data specific to this log statement 139 * @param message the message CharSequence to log. 140 */ 141 void debug(Marker marker, CharSequence message); 142 143 /** 144 * Logs a message CharSequence at the {@link Level#DEBUG DEBUG} level including the stack trace of the 145 * {@link Throwable} <code>t</code> passed as parameter. 146 * 147 * @param marker the marker data specific to this log statement 148 * @param message the message CharSequence to log. 149 * @param t the exception to log, including its stack trace. 150 */ 151 void debug(Marker marker, CharSequence message, Throwable t); 152 153 /** 154 * Logs a message object with the {@link Level#DEBUG DEBUG} level. 155 * 156 * @param marker the marker data specific to this log statement 157 * @param message the message object to log. 158 */ 159 void debug(Marker marker, Object message); 160 161 /** 162 * Logs a message at the {@link Level#DEBUG DEBUG} level including the stack trace of the {@link Throwable} 163 * <code>t</code> passed as parameter. 164 * 165 * @param marker the marker data specific to this log statement 166 * @param message the message to log. 167 * @param t the exception to log, including its stack trace. 168 */ 169 void debug(Marker marker, Object message, Throwable t); 170 171 /** 172 * Logs a message object with the {@link Level#DEBUG DEBUG} level. 173 * 174 * @param marker the marker data specific to this log statement 175 * @param message the message object to log. 176 */ 177 void debug(Marker marker, String message); 178 179 /** 180 * Logs a message with parameters at the {@link Level#DEBUG DEBUG} level. 181 * 182 * @param marker the marker data specific to this log statement 183 * @param message the message to log; the format depends on the message factory. 184 * @param params parameters to the message. 185 * @see #getMessageFactory() 186 */ 187 void debug(Marker marker, String message, Object... params); 188 189 /** 190 * Logs a message with parameters which are only to be constructed if the logging level is the {@link Level#DEBUG 191 * DEBUG} level. 192 * 193 * @param marker the marker data specific to this log statement 194 * @param message the message to log; the format depends on the message factory. 195 * @param paramSuppliers An array of functions, which when called, produce the desired log message parameters. 196 * @since 2.4 197 */ 198 void debug(Marker marker, String message, Supplier<?>... paramSuppliers); 199 200 /** 201 * Logs a message at the {@link Level#DEBUG DEBUG} level including the stack trace of the {@link Throwable} 202 * <code>t</code> passed as parameter. 203 * 204 * @param marker the marker data specific to this log statement 205 * @param message the message to log. 206 * @param t the exception to log, including its stack trace. 207 */ 208 void debug(Marker marker, String message, Throwable t); 209 210 /** 211 * Logs a message which is only to be constructed if the logging level is the {@link Level#DEBUG DEBUG} level with 212 * the specified Marker. 213 * 214 * @param marker the marker data specific to this log statement 215 * @param msgSupplier A function, which when called, produces the desired log message; the format depends on the 216 * message factory. 217 * @since 2.4 218 */ 219 void debug(Marker marker, Supplier<?> msgSupplier); 220 221 /** 222 * Logs a message (only to be constructed if the logging level is the {@link Level#DEBUG DEBUG} level) with the 223 * specified Marker and including the stack trace of the {@link Throwable} <code>t</code> passed as parameter. 224 * 225 * @param marker the marker data specific to this log statement 226 * @param msgSupplier A function, which when called, produces the desired log message; the format depends on the 227 * message factory. 228 * @param t A Throwable or null. 229 * @since 2.4 230 */ 231 void debug(Marker marker, Supplier<?> msgSupplier, Throwable t); 232 233 /** 234 * Logs a message with the specific Marker at the {@link Level#DEBUG DEBUG} level. 235 * 236 * @param msg the message string to be logged 237 */ 238 void debug(Message msg); 239 240 /** 241 * Logs a message with the specific Marker at the {@link Level#DEBUG DEBUG} level. 242 * 243 * @param msg the message string to be logged 244 * @param t A Throwable or null. 245 */ 246 void debug(Message msg, Throwable t); 247 248 /** 249 * Logs a message which is only to be constructed if the logging level is the {@link Level#DEBUG DEBUG} level. The 250 * {@code MessageSupplier} may or may not use the {@link MessageFactory} to construct the {@code Message}. 251 * 252 * @param msgSupplier A function, which when called, produces the desired log message. 253 * @since 2.4 254 * @deprecated Deprecated in 2.6, use the {@link Supplier} version of this API instead. 255 */ 256 @Deprecated 257 void debug(MessageSupplier msgSupplier); 258 259 /** 260 * Logs a message (only to be constructed if the logging level is the {@link Level#DEBUG DEBUG} level) including the 261 * stack trace of the {@link Throwable} <code>t</code> passed as parameter. The {@code MessageSupplier} may or may 262 * not use the {@link MessageFactory} to construct the {@code Message}. 263 * 264 * @param msgSupplier A function, which when called, produces the desired log message. 265 * @param t the exception to log, including its stack trace. 266 * @since 2.4 267 * @deprecated Deprecated in 2.6, use the {@link Supplier} version of this API instead. 268 */ 269 @Deprecated 270 void debug(MessageSupplier msgSupplier, Throwable t); 271 272 /** 273 * Logs a message CharSequence with the {@link Level#DEBUG DEBUG} level. 274 * 275 * @param message the message object to log. 276 */ 277 void debug(CharSequence message); 278 279 /** 280 * Logs a CharSequence at the {@link Level#DEBUG DEBUG} level including the stack trace of the {@link Throwable} 281 * <code>t</code> passed as parameter. 282 * 283 * @param message the message CharSequence to log. 284 * @param t the exception to log, including its stack trace. 285 */ 286 void debug(CharSequence message, Throwable t); 287 288 /** 289 * Logs a message object with the {@link Level#DEBUG DEBUG} level. 290 * 291 * @param message the message object to log. 292 */ 293 void debug(Object message); 294 295 /** 296 * Logs a message at the {@link Level#DEBUG DEBUG} level including the stack trace of the {@link Throwable} 297 * <code>t</code> passed as parameter. 298 * 299 * @param message the message to log. 300 * @param t the exception to log, including its stack trace. 301 */ 302 void debug(Object message, Throwable t); 303 304 /** 305 * Logs a message object with the {@link Level#DEBUG DEBUG} level. 306 * 307 * @param message the message string to log. 308 */ 309 void debug(String message); 310 311 /** 312 * Logs a message with parameters at the {@link Level#DEBUG DEBUG} level. 313 * 314 * @param message the message to log; the format depends on the message factory. 315 * @param params parameters to the message. 316 * @see #getMessageFactory() 317 */ 318 void debug(String message, Object... params); 319 320 /** 321 * Logs a message with parameters which are only to be constructed if the logging level is the {@link Level#DEBUG 322 * DEBUG} level. 323 * 324 * @param message the message to log; the format depends on the message factory. 325 * @param paramSuppliers An array of functions, which when called, produce the desired log message parameters. 326 * @since 2.4 327 */ 328 void debug(String message, Supplier<?>... paramSuppliers); 329 330 /** 331 * Logs a message at the {@link Level#DEBUG DEBUG} level including the stack trace of the {@link Throwable} 332 * <code>t</code> passed as parameter. 333 * 334 * @param message the message to log. 335 * @param t the exception to log, including its stack trace. 336 */ 337 void debug(String message, Throwable t); 338 339 /** 340 * Logs a message which is only to be constructed if the logging level is the {@link Level#DEBUG DEBUG} level. 341 * 342 * @param msgSupplier A function, which when called, produces the desired log message; the format depends on the 343 * message factory. 344 * @since 2.4 345 */ 346 void debug(Supplier<?> msgSupplier); 347 348 /** 349 * Logs a message (only to be constructed if the logging level is the {@link Level#DEBUG DEBUG} level) including the 350 * stack trace of the {@link Throwable} <code>t</code> passed as parameter. 351 * 352 * @param msgSupplier A function, which when called, produces the desired log message; the format depends on the 353 * message factory. 354 * @param t the exception to log, including its stack trace. 355 * @since 2.4 356 */ 357 void debug(Supplier<?> msgSupplier, Throwable t); 358 359 /** 360 * Logs a message with parameters at debug level. 361 * 362 * @param marker the marker data specific to this log statement 363 * @param message the message to log; the format depends on the message factory. 364 * @param p0 parameter to the message. 365 */ 366 void debug(Marker marker, String message, Object p0); 367 368 /** 369 * Logs a message with parameters at debug level. 370 * 371 * @param marker the marker data specific to this log statement 372 * @param message the message to log; the format depends on the message factory. 373 * @param p0 parameter to the message. 374 * @param p1 parameter to the message. 375 */ 376 void debug(Marker marker, String message, Object p0, Object p1); 377 378 /** 379 * Logs a message with parameters at debug level. 380 * 381 * @param marker the marker data specific to this log statement 382 * @param message the message to log; the format depends on the message factory. 383 * @param p0 parameter to the message. 384 * @param p1 parameter to the message. 385 * @param p2 parameter to the message. 386 */ 387 void debug(Marker marker, String message, Object p0, Object p1, Object p2); 388 389 /** 390 * Logs a message with parameters at debug level. 391 * 392 * @param marker the marker data specific to this log statement 393 * @param message the message to log; the format depends on the message factory. 394 * @param p0 parameter to the message. 395 * @param p1 parameter to the message. 396 * @param p2 parameter to the message. 397 * @param p3 parameter to the message. 398 */ 399 void debug(Marker marker, String message, Object p0, Object p1, Object p2, Object p3); 400 401 /** 402 * Logs a message with parameters at debug level. 403 * 404 * @param marker the marker data specific to this log statement 405 * @param message the message to log; the format depends on the message factory. 406 * @param p0 parameter to the message. 407 * @param p1 parameter to the message. 408 * @param p2 parameter to the message. 409 * @param p3 parameter to the message. 410 * @param p4 parameter to the message. 411 */ 412 void debug(Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4); 413 414 /** 415 * Logs a message with parameters at debug level. 416 * 417 * @param marker the marker data specific to this log statement 418 * @param message the message to log; the format depends on the message factory. 419 * @param p0 parameter to the message. 420 * @param p1 parameter to the message. 421 * @param p2 parameter to the message. 422 * @param p3 parameter to the message. 423 * @param p4 parameter to the message. 424 * @param p5 parameter to the message. 425 */ 426 void debug(Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5); 427 428 /** 429 * Logs a message with parameters at debug level. 430 * 431 * @param marker the marker data specific to this log statement 432 * @param message the message to log; the format depends on the message factory. 433 * @param p0 parameter to the message. 434 * @param p1 parameter to the message. 435 * @param p2 parameter to the message. 436 * @param p3 parameter to the message. 437 * @param p4 parameter to the message. 438 * @param p5 parameter to the message. 439 * @param p6 parameter to the message. 440 */ 441 void debug(Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, 442 Object p6); 443 444 /** 445 * Logs a message with parameters at debug level. 446 * 447 * @param marker the marker data specific to this log statement 448 * @param message the message to log; the format depends on the message factory. 449 * @param p0 parameter to the message. 450 * @param p1 parameter to the message. 451 * @param p2 parameter to the message. 452 * @param p3 parameter to the message. 453 * @param p4 parameter to the message. 454 * @param p5 parameter to the message. 455 * @param p6 parameter to the message. 456 * @param p7 parameter to the message. 457 */ 458 void debug(Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, 459 Object p7); 460 461 /** 462 * Logs a message with parameters at debug level. 463 * 464 * @param marker the marker data specific to this log statement 465 * @param message the message to log; the format depends on the message factory. 466 * @param p0 parameter to the message. 467 * @param p1 parameter to the message. 468 * @param p2 parameter to the message. 469 * @param p3 parameter to the message. 470 * @param p4 parameter to the message. 471 * @param p5 parameter to the message. 472 * @param p6 parameter to the message. 473 * @param p7 parameter to the message. 474 * @param p8 parameter to the message. 475 */ 476 void debug(Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, 477 Object p7, Object p8); 478 479 /** 480 * Logs a message with parameters at debug level. 481 * 482 * @param marker the marker data specific to this log statement 483 * @param message the message to log; the format depends on the message factory. 484 * @param p0 parameter to the message. 485 * @param p1 parameter to the message. 486 * @param p2 parameter to the message. 487 * @param p3 parameter to the message. 488 * @param p4 parameter to the message. 489 * @param p5 parameter to the message. 490 * @param p6 parameter to the message. 491 * @param p7 parameter to the message. 492 * @param p8 parameter to the message. 493 * @param p9 parameter to the message. 494 */ 495 void debug(Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, 496 Object p7, Object p8, Object p9); 497 498 /** 499 * Logs a message with parameters at debug level. 500 * 501 * @param message the message to log; the format depends on the message factory. 502 * @param p0 parameter to the message. 503 */ 504 void debug(String message, Object p0); 505 506 /** 507 * Logs a message with parameters at debug level. 508 * 509 * @param message the message to log; the format depends on the message factory. 510 * @param p0 parameter to the message. 511 * @param p1 parameter to the message. 512 */ 513 void debug(String message, Object p0, Object p1); 514 515 /** 516 * Logs a message with parameters at debug level. 517 * 518 * @param message the message to log; the format depends on the message factory. 519 * @param p0 parameter to the message. 520 * @param p1 parameter to the message. 521 * @param p2 parameter to the message. 522 */ 523 void debug(String message, Object p0, Object p1, Object p2); 524 525 /** 526 * Logs a message with parameters at debug level. 527 * 528 * @param message the message to log; the format depends on the message factory. 529 * @param p0 parameter to the message. 530 * @param p1 parameter to the message. 531 * @param p2 parameter to the message. 532 * @param p3 parameter to the message. 533 */ 534 void debug(String message, Object p0, Object p1, Object p2, Object p3); 535 536 /** 537 * Logs a message with parameters at debug level. 538 * 539 * @param message the message to log; the format depends on the message factory. 540 * @param p0 parameter to the message. 541 * @param p1 parameter to the message. 542 * @param p2 parameter to the message. 543 * @param p3 parameter to the message. 544 * @param p4 parameter to the message. 545 */ 546 void debug(String message, Object p0, Object p1, Object p2, Object p3, Object p4); 547 548 /** 549 * Logs a message with parameters at debug level. 550 * 551 * @param message the message to log; the format depends on the message factory. 552 * @param p0 parameter to the message. 553 * @param p1 parameter to the message. 554 * @param p2 parameter to the message. 555 * @param p3 parameter to the message. 556 * @param p4 parameter to the message. 557 * @param p5 parameter to the message. 558 */ 559 void debug(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5); 560 561 /** 562 * Logs a message with parameters at debug level. 563 * 564 * @param message the message to log; the format depends on the message factory. 565 * @param p0 parameter to the message. 566 * @param p1 parameter to the message. 567 * @param p2 parameter to the message. 568 * @param p3 parameter to the message. 569 * @param p4 parameter to the message. 570 * @param p5 parameter to the message. 571 * @param p6 parameter to the message. 572 */ 573 void debug(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6); 574 575 /** 576 * Logs a message with parameters at debug level. 577 * 578 * @param message the message to log; the format depends on the message factory. 579 * @param p0 parameter to the message. 580 * @param p1 parameter to the message. 581 * @param p2 parameter to the message. 582 * @param p3 parameter to the message. 583 * @param p4 parameter to the message. 584 * @param p5 parameter to the message. 585 * @param p6 parameter to the message. 586 * @param p7 parameter to the message. 587 */ 588 void debug(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7); 589 590 /** 591 * Logs a message with parameters at debug level. 592 * 593 * @param message the message to log; the format depends on the message factory. 594 * @param p0 parameter to the message. 595 * @param p1 parameter to the message. 596 * @param p2 parameter to the message. 597 * @param p3 parameter to the message. 598 * @param p4 parameter to the message. 599 * @param p5 parameter to the message. 600 * @param p6 parameter to the message. 601 * @param p7 parameter to the message. 602 * @param p8 parameter to the message. 603 */ 604 void debug(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7, 605 Object p8); 606 607 /** 608 * Logs a message with parameters at debug level. 609 * 610 * @param message the message to log; the format depends on the message factory. 611 * @param p0 parameter to the message. 612 * @param p1 parameter to the message. 613 * @param p2 parameter to the message. 614 * @param p3 parameter to the message. 615 * @param p4 parameter to the message. 616 * @param p5 parameter to the message. 617 * @param p6 parameter to the message. 618 * @param p7 parameter to the message. 619 * @param p8 parameter to the message. 620 * @param p9 parameter to the message. 621 */ 622 void debug(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7, 623 Object p8, Object p9); 624 625 /** 626 * Logs entry to a method. Used when the method in question has no parameters or when the parameters should not be 627 * logged. 628 * @deprecated Use {@link #traceEntry()} instead which performs the same function. 629 */ 630 @Deprecated 631 void entry(); 632 633 /** 634 * Logs entry to a method along with its parameters (consider using one of the {@code traceEntry(...)} methods instead.) 635 * <p> 636 * For example: 637 * </p> 638 * <pre> 639 * public void doSomething(String foo, int bar) { 640 * LOGGER.entry(foo, bar); 641 * // do something 642 * } 643 * </pre> 644 * <p> 645 * The use of methods such as this are more effective when combined with aspect-oriented programming or other 646 * bytecode manipulation tools. It can be rather tedious (and messy) to use this type of method manually. 647 * </p> 648 * 649 * @param params The parameters to the method. 650 */ 651 void entry(Object... params); 652 653 /** 654 * Logs a message with the specific Marker at the {@link Level#ERROR ERROR} level. 655 * 656 * @param marker the marker data specific to this log statement 657 * @param msg the message string to be logged 658 */ 659 void error(Marker marker, Message msg); 660 661 /** 662 * Logs a message with the specific Marker at the {@link Level#ERROR ERROR} level. 663 * 664 * @param marker the marker data specific to this log statement 665 * @param msg the message string to be logged 666 * @param t A Throwable or null. 667 */ 668 void error(Marker marker, Message msg, Throwable t); 669 670 /** 671 * Logs a message which is only to be constructed if the logging level is the {@link Level#ERROR ERROR} level with 672 * the specified Marker. The {@code MessageSupplier} may or may not use the {@link MessageFactory} to construct the 673 * {@code Message}. 674 * 675 * @param marker the marker data specific to this log statement 676 * @param msgSupplier A function, which when called, produces the desired log message. 677 * @since 2.4 678 * @deprecated Deprecated in 2.6, use the {@link Supplier} version of this API instead. 679 */ 680 @Deprecated 681 void error(Marker marker, MessageSupplier msgSupplier); 682 683 /** 684 * Logs a message (only to be constructed if the logging level is the {@link Level#ERROR ERROR} level) with the 685 * specified Marker and including the stack trace of the {@link Throwable} <code>t</code> passed as parameter. The 686 * {@code MessageSupplier} may or may not use the {@link MessageFactory} to construct the {@code Message}. 687 * 688 * @param marker the marker data specific to this log statement 689 * @param msgSupplier A function, which when called, produces the desired log message. 690 * @param t A Throwable or null. 691 * @since 2.4 692 * @deprecated Deprecated in 2.6, use the {@link Supplier} version of this API instead. 693 */ 694 @Deprecated 695 void error(Marker marker, MessageSupplier msgSupplier, Throwable t); 696 697 /** 698 * Logs a message CharSequence with the {@link Level#ERROR ERROR} level. 699 * 700 * @param marker the marker data specific to this log statement. 701 * @param message the message CharSequence to log. 702 */ 703 void error(Marker marker, CharSequence message); 704 705 /** 706 * Logs a CharSequence at the {@link Level#ERROR ERROR} level including the stack trace of the {@link Throwable} 707 * <code>t</code> passed as parameter. 708 * 709 * @param marker the marker data specific to this log statement. 710 * @param message the message CharSequence to log. 711 * @param t the exception to log, including its stack trace. 712 */ 713 void error(Marker marker, CharSequence message, Throwable t); 714 715 /** 716 * Logs a message object with the {@link Level#ERROR ERROR} level. 717 * 718 * @param marker the marker data specific to this log statement. 719 * @param message the message object to log. 720 */ 721 void error(Marker marker, Object message); 722 723 /** 724 * Logs a message at the {@link Level#ERROR ERROR} level including the stack trace of the {@link Throwable} 725 * <code>t</code> passed as parameter. 726 * 727 * @param marker the marker data specific to this log statement. 728 * @param message the message object to log. 729 * @param t the exception to log, including its stack trace. 730 */ 731 void error(Marker marker, Object message, Throwable t); 732 733 /** 734 * Logs a message object with the {@link Level#ERROR ERROR} level. 735 * 736 * @param marker the marker data specific to this log statement. 737 * @param message the message object to log. 738 */ 739 void error(Marker marker, String message); 740 741 /** 742 * Logs a message with parameters at the {@link Level#ERROR ERROR} level. 743 * 744 * @param marker the marker data specific to this log statement. 745 * @param message the message to log; the format depends on the message factory. 746 * @param params parameters to the message. 747 * @see #getMessageFactory() 748 */ 749 void error(Marker marker, String message, Object... params); 750 751 /** 752 * Logs a message with parameters which are only to be constructed if the logging level is the {@link Level#ERROR 753 * ERROR} level. 754 * 755 * @param marker the marker data specific to this log statement 756 * @param message the message to log; the format depends on the message factory. 757 * @param paramSuppliers An array of functions, which when called, produce the desired log message parameters. 758 * @since 2.4 759 */ 760 void error(Marker marker, String message, Supplier<?>... paramSuppliers); 761 762 /** 763 * Logs a message at the {@link Level#ERROR ERROR} level including the stack trace of the {@link Throwable} 764 * <code>t</code> passed as parameter. 765 * 766 * @param marker the marker data specific to this log statement. 767 * @param message the message object to log. 768 * @param t the exception to log, including its stack trace. 769 */ 770 void error(Marker marker, String message, Throwable t); 771 772 /** 773 * Logs a message which is only to be constructed if the logging level is the {@link Level#ERROR ERROR} level with 774 * the specified Marker. 775 * 776 * @param marker the marker data specific to this log statement 777 * @param msgSupplier A function, which when called, produces the desired log message; the format depends on the 778 * message factory. 779 * @since 2.4 780 */ 781 void error(Marker marker, Supplier<?> msgSupplier); 782 783 /** 784 * Logs a message (only to be constructed if the logging level is the {@link Level#ERROR ERROR} level) with the 785 * specified Marker and including the stack trace of the {@link Throwable} <code>t</code> passed as parameter. 786 * 787 * @param marker the marker data specific to this log statement 788 * @param msgSupplier A function, which when called, produces the desired log message; the format depends on the 789 * message factory. 790 * @param t A Throwable or null. 791 * @since 2.4 792 */ 793 void error(Marker marker, Supplier<?> msgSupplier, Throwable t); 794 795 /** 796 * Logs a message with the specific Marker at the {@link Level#ERROR ERROR} level. 797 * 798 * @param msg the message string to be logged 799 */ 800 void error(Message msg); 801 802 /** 803 * Logs a message with the specific Marker at the {@link Level#ERROR ERROR} level. 804 * 805 * @param msg the message string to be logged 806 * @param t A Throwable or null. 807 */ 808 void error(Message msg, Throwable t); 809 810 /** 811 * Logs a message which is only to be constructed if the logging level is the {@link Level#ERROR ERROR} level. The 812 * {@code MessageSupplier} may or may not use the {@link MessageFactory} to construct the {@code Message}. 813 * 814 * @param msgSupplier A function, which when called, produces the desired log message. 815 * @since 2.4 816 * @deprecated Deprecated in 2.6, use the {@link Supplier} version of this API instead. 817 */ 818 @Deprecated 819 void error(MessageSupplier msgSupplier); 820 821 /** 822 * Logs a message (only to be constructed if the logging level is the {@link Level#ERROR ERROR} level) including the 823 * stack trace of the {@link Throwable} <code>t</code> passed as parameter. The {@code MessageSupplier} may or may 824 * not use the {@link MessageFactory} to construct the {@code Message}. 825 * 826 * @param msgSupplier A function, which when called, produces the desired log message. 827 * @param t the exception to log, including its stack trace. 828 * @since 2.4 829 * @deprecated Deprecated in 2.6, use the {@link Supplier} version of this API instead. 830 */ 831 @Deprecated 832 void error(MessageSupplier msgSupplier, Throwable t); 833 834 /** 835 * Logs a message CharSequence with the {@link Level#ERROR ERROR} level. 836 * 837 * @param message the message CharSequence to log. 838 */ 839 void error(CharSequence message); 840 841 /** 842 * Logs a CharSequence at the {@link Level#ERROR ERROR} level including the stack trace of the {@link Throwable} 843 * <code>t</code> passed as parameter. 844 * 845 * @param message the message CharSequence to log. 846 * @param t the exception to log, including its stack trace. 847 */ 848 void error(CharSequence message, Throwable t); 849 850 /** 851 * Logs a message object with the {@link Level#ERROR ERROR} level. 852 * 853 * @param message the message object to log. 854 */ 855 void error(Object message); 856 857 /** 858 * Logs a message at the {@link Level#ERROR ERROR} level including the stack trace of the {@link Throwable} 859 * <code>t</code> passed as parameter. 860 * 861 * @param message the message object to log. 862 * @param t the exception to log, including its stack trace. 863 */ 864 void error(Object message, Throwable t); 865 866 /** 867 * Logs a message object with the {@link Level#ERROR ERROR} level. 868 * 869 * @param message the message string to log. 870 */ 871 void error(String message); 872 873 /** 874 * Logs a message with parameters at the {@link Level#ERROR ERROR} level. 875 * 876 * @param message the message to log; the format depends on the message factory. 877 * @param params parameters to the message. 878 * @see #getMessageFactory() 879 */ 880 void error(String message, Object... params); 881 882 /** 883 * Logs a message with parameters which are only to be constructed if the logging level is the {@link Level#ERROR 884 * ERROR} level. 885 * 886 * @param message the message to log; the format depends on the message factory. 887 * @param paramSuppliers An array of functions, which when called, produce the desired log message parameters. 888 * @since 2.4 889 */ 890 void error(String message, Supplier<?>... paramSuppliers); 891 892 /** 893 * Logs a message at the {@link Level#ERROR ERROR} level including the stack trace of the {@link Throwable} 894 * <code>t</code> passed as parameter. 895 * 896 * @param message the message object to log. 897 * @param t the exception to log, including its stack trace. 898 */ 899 void error(String message, Throwable t); 900 901 /** 902 * Logs a message which is only to be constructed if the logging level is the {@link Level#ERROR ERROR} level. 903 * 904 * @param msgSupplier A function, which when called, produces the desired log message; the format depends on the 905 * message factory. 906 * @since 2.4 907 */ 908 void error(Supplier<?> msgSupplier); 909 910 /** 911 * Logs a message (only to be constructed if the logging level is the {@link Level#ERROR ERROR} level) including the 912 * stack trace of the {@link Throwable} <code>t</code> passed as parameter. 913 * 914 * @param msgSupplier A function, which when called, produces the desired log message; the format depends on the 915 * message factory. 916 * @param t the exception to log, including its stack trace. 917 * @since 2.4 918 */ 919 void error(Supplier<?> msgSupplier, Throwable t); 920 921 /** 922 * Logs a message with parameters at error level. 923 * 924 * @param marker the marker data specific to this log statement 925 * @param message the message to log; the format depends on the message factory. 926 * @param p0 parameter to the message. 927 */ 928 void error(Marker marker, String message, Object p0); 929 930 /** 931 * Logs a message with parameters at error level. 932 * 933 * @param marker the marker data specific to this log statement 934 * @param message the message to log; the format depends on the message factory. 935 * @param p0 parameter to the message. 936 * @param p1 parameter to the message. 937 */ 938 void error(Marker marker, String message, Object p0, Object p1); 939 940 /** 941 * Logs a message with parameters at error level. 942 * 943 * @param marker the marker data specific to this log statement 944 * @param message the message to log; the format depends on the message factory. 945 * @param p0 parameter to the message. 946 * @param p1 parameter to the message. 947 * @param p2 parameter to the message. 948 */ 949 void error(Marker marker, String message, Object p0, Object p1, Object p2); 950 951 /** 952 * Logs a message with parameters at error level. 953 * 954 * @param marker the marker data specific to this log statement 955 * @param message the message to log; the format depends on the message factory. 956 * @param p0 parameter to the message. 957 * @param p1 parameter to the message. 958 * @param p2 parameter to the message. 959 * @param p3 parameter to the message. 960 */ 961 void error(Marker marker, String message, Object p0, Object p1, Object p2, Object p3); 962 963 /** 964 * Logs a message with parameters at error level. 965 * 966 * @param marker the marker data specific to this log statement 967 * @param message the message to log; the format depends on the message factory. 968 * @param p0 parameter to the message. 969 * @param p1 parameter to the message. 970 * @param p2 parameter to the message. 971 * @param p3 parameter to the message. 972 * @param p4 parameter to the message. 973 */ 974 void error(Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4); 975 976 /** 977 * Logs a message with parameters at error level. 978 * 979 * @param marker the marker data specific to this log statement 980 * @param message the message to log; the format depends on the message factory. 981 * @param p0 parameter to the message. 982 * @param p1 parameter to the message. 983 * @param p2 parameter to the message. 984 * @param p3 parameter to the message. 985 * @param p4 parameter to the message. 986 * @param p5 parameter to the message. 987 */ 988 void error(Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5); 989 990 /** 991 * Logs a message with parameters at error level. 992 * 993 * @param marker the marker data specific to this log statement 994 * @param message the message to log; the format depends on the message factory. 995 * @param p0 parameter to the message. 996 * @param p1 parameter to the message. 997 * @param p2 parameter to the message. 998 * @param p3 parameter to the message. 999 * @param p4 parameter to the message. 1000 * @param p5 parameter to the message. 1001 * @param p6 parameter to the message. 1002 */ 1003 void error(Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, 1004 Object p6); 1005 1006 /** 1007 * Logs a message with parameters at error level. 1008 * 1009 * @param marker the marker data specific to this log statement 1010 * @param message the message to log; the format depends on the message factory. 1011 * @param p0 parameter to the message. 1012 * @param p1 parameter to the message. 1013 * @param p2 parameter to the message. 1014 * @param p3 parameter to the message. 1015 * @param p4 parameter to the message. 1016 * @param p5 parameter to the message. 1017 * @param p6 parameter to the message. 1018 * @param p7 parameter to the message. 1019 */ 1020 void error(Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, 1021 Object p7); 1022 1023 /** 1024 * Logs a message with parameters at error level. 1025 * 1026 * @param marker the marker data specific to this log statement 1027 * @param message the message to log; the format depends on the message factory. 1028 * @param p0 parameter to the message. 1029 * @param p1 parameter to the message. 1030 * @param p2 parameter to the message. 1031 * @param p3 parameter to the message. 1032 * @param p4 parameter to the message. 1033 * @param p5 parameter to the message. 1034 * @param p6 parameter to the message. 1035 * @param p7 parameter to the message. 1036 * @param p8 parameter to the message. 1037 */ 1038 void error(Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, 1039 Object p7, Object p8); 1040 1041 /** 1042 * Logs a message with parameters at error level. 1043 * 1044 * @param marker the marker data specific to this log statement 1045 * @param message the message to log; the format depends on the message factory. 1046 * @param p0 parameter to the message. 1047 * @param p1 parameter to the message. 1048 * @param p2 parameter to the message. 1049 * @param p3 parameter to the message. 1050 * @param p4 parameter to the message. 1051 * @param p5 parameter to the message. 1052 * @param p6 parameter to the message. 1053 * @param p7 parameter to the message. 1054 * @param p8 parameter to the message. 1055 * @param p9 parameter to the message. 1056 */ 1057 void error(Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, 1058 Object p7, Object p8, Object p9); 1059 1060 /** 1061 * Logs a message with parameters at error level. 1062 * 1063 * @param message the message to log; the format depends on the message factory. 1064 * @param p0 parameter to the message. 1065 */ 1066 void error(String message, Object p0); 1067 1068 /** 1069 * Logs a message with parameters at error level. 1070 * 1071 * @param message the message to log; the format depends on the message factory. 1072 * @param p0 parameter to the message. 1073 * @param p1 parameter to the message. 1074 */ 1075 void error(String message, Object p0, Object p1); 1076 1077 /** 1078 * Logs a message with parameters at error level. 1079 * 1080 * @param message the message to log; the format depends on the message factory. 1081 * @param p0 parameter to the message. 1082 * @param p1 parameter to the message. 1083 * @param p2 parameter to the message. 1084 */ 1085 void error(String message, Object p0, Object p1, Object p2); 1086 1087 /** 1088 * Logs a message with parameters at error level. 1089 * 1090 * @param message the message to log; the format depends on the message factory. 1091 * @param p0 parameter to the message. 1092 * @param p1 parameter to the message. 1093 * @param p2 parameter to the message. 1094 * @param p3 parameter to the message. 1095 */ 1096 void error(String message, Object p0, Object p1, Object p2, Object p3); 1097 1098 /** 1099 * Logs a message with parameters at error level. 1100 * 1101 * @param message the message to log; the format depends on the message factory. 1102 * @param p0 parameter to the message. 1103 * @param p1 parameter to the message. 1104 * @param p2 parameter to the message. 1105 * @param p3 parameter to the message. 1106 * @param p4 parameter to the message. 1107 */ 1108 void error(String message, Object p0, Object p1, Object p2, Object p3, Object p4); 1109 1110 /** 1111 * Logs a message with parameters at error level. 1112 * 1113 * @param message the message to log; the format depends on the message factory. 1114 * @param p0 parameter to the message. 1115 * @param p1 parameter to the message. 1116 * @param p2 parameter to the message. 1117 * @param p3 parameter to the message. 1118 * @param p4 parameter to the message. 1119 * @param p5 parameter to the message. 1120 */ 1121 void error(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5); 1122 1123 /** 1124 * Logs a message with parameters at error level. 1125 * 1126 * @param message the message to log; the format depends on the message factory. 1127 * @param p0 parameter to the message. 1128 * @param p1 parameter to the message. 1129 * @param p2 parameter to the message. 1130 * @param p3 parameter to the message. 1131 * @param p4 parameter to the message. 1132 * @param p5 parameter to the message. 1133 * @param p6 parameter to the message. 1134 */ 1135 void error(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6); 1136 1137 /** 1138 * Logs a message with parameters at error level. 1139 * 1140 * @param message the message to log; the format depends on the message factory. 1141 * @param p0 parameter to the message. 1142 * @param p1 parameter to the message. 1143 * @param p2 parameter to the message. 1144 * @param p3 parameter to the message. 1145 * @param p4 parameter to the message. 1146 * @param p5 parameter to the message. 1147 * @param p6 parameter to the message. 1148 * @param p7 parameter to the message. 1149 */ 1150 void error(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7); 1151 1152 /** 1153 * Logs a message with parameters at error level. 1154 * 1155 * @param message the message to log; the format depends on the message factory. 1156 * @param p0 parameter to the message. 1157 * @param p1 parameter to the message. 1158 * @param p2 parameter to the message. 1159 * @param p3 parameter to the message. 1160 * @param p4 parameter to the message. 1161 * @param p5 parameter to the message. 1162 * @param p6 parameter to the message. 1163 * @param p7 parameter to the message. 1164 * @param p8 parameter to the message. 1165 */ 1166 void error(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7, 1167 Object p8); 1168 1169 /** 1170 * Logs a message with parameters at error level. 1171 * 1172 * @param message the message to log; the format depends on the message factory. 1173 * @param p0 parameter to the message. 1174 * @param p1 parameter to the message. 1175 * @param p2 parameter to the message. 1176 * @param p3 parameter to the message. 1177 * @param p4 parameter to the message. 1178 * @param p5 parameter to the message. 1179 * @param p6 parameter to the message. 1180 * @param p7 parameter to the message. 1181 * @param p8 parameter to the message. 1182 * @param p9 parameter to the message. 1183 */ 1184 void error(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7, 1185 Object p8, Object p9); 1186 1187 /** 1188 * Logs exit from a method. Used for methods that do not return anything. 1189 * @deprecated Use {@link #traceExit()} instead which performs the same function. 1190 */ 1191 @Deprecated 1192 void exit(); 1193 1194 /** 1195 * Logs exiting from a method with the result. This may be coded as: 1196 * 1197 * <pre> 1198 * return LOGGER.exit(myResult); 1199 * </pre> 1200 * 1201 * @param <R> The type of the parameter and object being returned. 1202 * @param result The result being returned from the method call. 1203 * @return the result. 1204 * @deprecated Use {@link #traceExit(Object)} instead which performs the same function. 1205 */ 1206 @Deprecated 1207 <R> R exit(R result); 1208 1209 /** 1210 * Logs a message with the specific Marker at the {@link Level#FATAL FATAL} level. 1211 * 1212 * @param marker the marker data specific to this log statement 1213 * @param msg the message string to be logged 1214 */ 1215 void fatal(Marker marker, Message msg); 1216 1217 /** 1218 * Logs a message with the specific Marker at the {@link Level#FATAL FATAL} level. 1219 * 1220 * @param marker the marker data specific to this log statement 1221 * @param msg the message string to be logged 1222 * @param t A Throwable or null. 1223 */ 1224 void fatal(Marker marker, Message msg, Throwable t); 1225 1226 /** 1227 * Logs a message which is only to be constructed if the logging level is the {@link Level#FATAL FATAL} level with 1228 * the specified Marker. The {@code MessageSupplier} may or may not use the {@link MessageFactory} to construct the 1229 * {@code Message}. 1230 * 1231 * @param marker the marker data specific to this log statement 1232 * @param msgSupplier A function, which when called, produces the desired log message. 1233 * @since 2.4 1234 * @deprecated Deprecated in 2.6, use the {@link Supplier} version of this API instead. 1235 */ 1236 @Deprecated 1237 void fatal(Marker marker, MessageSupplier msgSupplier); 1238 1239 /** 1240 * Logs a message (only to be constructed if the logging level is the {@link Level#FATAL FATAL} level) with the 1241 * specified Marker and including the stack trace of the {@link Throwable} <code>t</code> passed as parameter. The 1242 * {@code MessageSupplier} may or may not use the {@link MessageFactory} to construct the {@code Message}. 1243 * 1244 * @param marker the marker data specific to this log statement 1245 * @param msgSupplier A function, which when called, produces the desired log message. 1246 * @param t A Throwable or null. 1247 * @since 2.4 1248 * @deprecated Deprecated in 2.6, use the {@link Supplier} version of this API instead. 1249 */ 1250 @Deprecated 1251 void fatal(Marker marker, MessageSupplier msgSupplier, Throwable t); 1252 1253 /** 1254 * Logs a message CharSequence with the {@link Level#FATAL FATAL} level. 1255 * 1256 * @param marker The marker data specific to this log statement. 1257 * @param message the message CharSequence to log. 1258 */ 1259 void fatal(Marker marker, CharSequence message); 1260 1261 /** 1262 * Logs a CharSequence at the {@link Level#FATAL FATAL} level including the stack trace of the {@link Throwable} 1263 * <code>t</code> passed as parameter. 1264 * 1265 * @param marker The marker data specific to this log statement. 1266 * @param message the message CharSequence to log. 1267 * @param t the exception to log, including its stack trace. 1268 */ 1269 void fatal(Marker marker, CharSequence message, Throwable t); 1270 1271 /** 1272 * Logs a message object with the {@link Level#FATAL FATAL} level. 1273 * 1274 * @param marker The marker data specific to this log statement. 1275 * @param message the message object to log. 1276 */ 1277 void fatal(Marker marker, Object message); 1278 1279 /** 1280 * Logs a message at the {@link Level#FATAL FATAL} level including the stack trace of the {@link Throwable} 1281 * <code>t</code> passed as parameter. 1282 * 1283 * @param marker The marker data specific to this log statement. 1284 * @param message the message object to log. 1285 * @param t the exception to log, including its stack trace. 1286 */ 1287 void fatal(Marker marker, Object message, Throwable t); 1288 1289 /** 1290 * Logs a message object with the {@link Level#FATAL FATAL} level. 1291 * 1292 * @param marker The marker data specific to this log statement. 1293 * @param message the message object to log. 1294 */ 1295 void fatal(Marker marker, String message); 1296 1297 /** 1298 * Logs a message with parameters at the {@link Level#FATAL FATAL} level. 1299 * 1300 * @param marker The marker data specific to this log statement. 1301 * @param message the message to log; the format depends on the message factory. 1302 * @param params parameters to the message. 1303 * @see #getMessageFactory() 1304 */ 1305 void fatal(Marker marker, String message, Object... params); 1306 1307 /** 1308 * Logs a message with parameters which are only to be constructed if the logging level is the {@link Level#FATAL 1309 * FATAL} level. 1310 * 1311 * @param marker the marker data specific to this log statement 1312 * @param message the message to log; the format depends on the message factory. 1313 * @param paramSuppliers An array of functions, which when called, produce the desired log message parameters. 1314 * @since 2.4 1315 */ 1316 void fatal(Marker marker, String message, Supplier<?>... paramSuppliers); 1317 1318 /** 1319 * Logs a message at the {@link Level#FATAL FATAL} level including the stack trace of the {@link Throwable} 1320 * <code>t</code> passed as parameter. 1321 * 1322 * @param marker The marker data specific to this log statement. 1323 * @param message the message object to log. 1324 * @param t the exception to log, including its stack trace. 1325 */ 1326 void fatal(Marker marker, String message, Throwable t); 1327 1328 /** 1329 * Logs a message which is only to be constructed if the logging level is the {@link Level#FATAL FATAL} level with 1330 * the specified Marker. 1331 * 1332 * @param marker the marker data specific to this log statement 1333 * @param msgSupplier A function, which when called, produces the desired log message; the format depends on the 1334 * message factory. 1335 * @since 2.4 1336 */ 1337 void fatal(Marker marker, Supplier<?> msgSupplier); 1338 1339 /** 1340 * Logs a message (only to be constructed if the logging level is the {@link Level#FATAL FATAL} level) with the 1341 * specified Marker and including the stack trace of the {@link Throwable} <code>t</code> passed as parameter. 1342 * 1343 * @param marker the marker data specific to this log statement 1344 * @param msgSupplier A function, which when called, produces the desired log message; the format depends on the 1345 * message factory. 1346 * @param t A Throwable or null. 1347 * @since 2.4 1348 */ 1349 void fatal(Marker marker, Supplier<?> msgSupplier, Throwable t); 1350 1351 /** 1352 * Logs a message with the specific Marker at the {@link Level#FATAL FATAL} level. 1353 * 1354 * @param msg the message string to be logged 1355 */ 1356 void fatal(Message msg); 1357 1358 /** 1359 * Logs a message with the specific Marker at the {@link Level#FATAL FATAL} level. 1360 * 1361 * @param msg the message string to be logged 1362 * @param t A Throwable or null. 1363 */ 1364 void fatal(Message msg, Throwable t); 1365 1366 /** 1367 * Logs a message which is only to be constructed if the logging level is the {@link Level#FATAL FATAL} level. The 1368 * {@code MessageSupplier} may or may not use the {@link MessageFactory} to construct the {@code Message}. 1369 * 1370 * @param msgSupplier A function, which when called, produces the desired log message. 1371 * @since 2.4 1372 * @deprecated Deprecated in 2.6, use the {@link Supplier} version of this API instead. 1373 */ 1374 @Deprecated 1375 void fatal(MessageSupplier msgSupplier); 1376 1377 /** 1378 * Logs a message (only to be constructed if the logging level is the {@link Level#FATAL FATAL} level) including the 1379 * stack trace of the {@link Throwable} <code>t</code> passed as parameter. The {@code MessageSupplier} may or may 1380 * not use the {@link MessageFactory} to construct the {@code Message}. 1381 * 1382 * @param msgSupplier A function, which when called, produces the desired log message. 1383 * @param t the exception to log, including its stack trace. 1384 * @since 2.4 1385 * @deprecated Deprecated in 2.6, use the {@link Supplier} version of this API instead. 1386 */ 1387 @Deprecated 1388 void fatal(MessageSupplier msgSupplier, Throwable t); 1389 1390 /** 1391 * Logs a message CharSequence with the {@link Level#FATAL FATAL} level. 1392 * 1393 * @param message the message CharSequence to log. 1394 */ 1395 void fatal(CharSequence message); 1396 1397 /** 1398 * Logs a CharSequence at the {@link Level#FATAL FATAL} level including the stack trace of the {@link Throwable} 1399 * <code>t</code> passed as parameter. 1400 * 1401 * @param message the message CharSequence to log. 1402 * @param t the exception to log, including its stack trace. 1403 */ 1404 void fatal(CharSequence message, Throwable t); 1405 1406 /** 1407 * Logs a message object with the {@link Level#FATAL FATAL} level. 1408 * 1409 * @param message the message object to log. 1410 */ 1411 void fatal(Object message); 1412 1413 /** 1414 * Logs a message at the {@link Level#FATAL FATAL} level including the stack trace of the {@link Throwable} 1415 * <code>t</code> passed as parameter. 1416 * 1417 * @param message the message object to log. 1418 * @param t the exception to log, including its stack trace. 1419 */ 1420 void fatal(Object message, Throwable t); 1421 1422 /** 1423 * Logs a message object with the {@link Level#FATAL FATAL} level. 1424 * 1425 * @param message the message string to log. 1426 */ 1427 void fatal(String message); 1428 1429 /** 1430 * Logs a message with parameters at the {@link Level#FATAL FATAL} level. 1431 * 1432 * @param message the message to log; the format depends on the message factory. 1433 * @param params parameters to the message. 1434 * @see #getMessageFactory() 1435 */ 1436 void fatal(String message, Object... params); 1437 1438 /** 1439 * Logs a message with parameters which are only to be constructed if the logging level is the {@link Level#FATAL 1440 * FATAL} level. 1441 * 1442 * @param message the message to log; the format depends on the message factory. 1443 * @param paramSuppliers An array of functions, which when called, produce the desired log message parameters. 1444 * @since 2.4 1445 */ 1446 void fatal(String message, Supplier<?>... paramSuppliers); 1447 1448 /** 1449 * Logs a message at the {@link Level#FATAL FATAL} level including the stack trace of the {@link Throwable} 1450 * <code>t</code> passed as parameter. 1451 * 1452 * @param message the message object to log. 1453 * @param t the exception to log, including its stack trace. 1454 */ 1455 void fatal(String message, Throwable t); 1456 1457 /** 1458 * Logs a message which is only to be constructed if the logging level is the {@link Level#FATAL FATAL} level. 1459 * 1460 * @param msgSupplier A function, which when called, produces the desired log message; the format depends on the 1461 * message factory. 1462 * @since 2.4 1463 */ 1464 void fatal(Supplier<?> msgSupplier); 1465 1466 /** 1467 * Logs a message (only to be constructed if the logging level is the {@link Level#FATAL FATAL} level) including the 1468 * stack trace of the {@link Throwable} <code>t</code> passed as parameter. 1469 * 1470 * @param msgSupplier A function, which when called, produces the desired log message; the format depends on the 1471 * message factory. 1472 * @param t the exception to log, including its stack trace. 1473 * @since 2.4 1474 */ 1475 void fatal(Supplier<?> msgSupplier, Throwable t); 1476 1477 /** 1478 * Logs a message with parameters at fatal level. 1479 * 1480 * @param marker the marker data specific to this log statement 1481 * @param message the message to log; the format depends on the message factory. 1482 * @param p0 parameter to the message. 1483 */ 1484 void fatal(Marker marker, String message, Object p0); 1485 1486 /** 1487 * Logs a message with parameters at fatal level. 1488 * 1489 * @param marker the marker data specific to this log statement 1490 * @param message the message to log; the format depends on the message factory. 1491 * @param p0 parameter to the message. 1492 * @param p1 parameter to the message. 1493 */ 1494 void fatal(Marker marker, String message, Object p0, Object p1); 1495 1496 /** 1497 * Logs a message with parameters at fatal level. 1498 * 1499 * @param marker the marker data specific to this log statement 1500 * @param message the message to log; the format depends on the message factory. 1501 * @param p0 parameter to the message. 1502 * @param p1 parameter to the message. 1503 * @param p2 parameter to the message. 1504 */ 1505 void fatal(Marker marker, String message, Object p0, Object p1, Object p2); 1506 1507 /** 1508 * Logs a message with parameters at fatal level. 1509 * 1510 * @param marker the marker data specific to this log statement 1511 * @param message the message to log; the format depends on the message factory. 1512 * @param p0 parameter to the message. 1513 * @param p1 parameter to the message. 1514 * @param p2 parameter to the message. 1515 * @param p3 parameter to the message. 1516 */ 1517 void fatal(Marker marker, String message, Object p0, Object p1, Object p2, Object p3); 1518 1519 /** 1520 * Logs a message with parameters at fatal level. 1521 * 1522 * @param marker the marker data specific to this log statement 1523 * @param message the message to log; the format depends on the message factory. 1524 * @param p0 parameter to the message. 1525 * @param p1 parameter to the message. 1526 * @param p2 parameter to the message. 1527 * @param p3 parameter to the message. 1528 * @param p4 parameter to the message. 1529 */ 1530 void fatal(Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4); 1531 1532 /** 1533 * Logs a message with parameters at fatal level. 1534 * 1535 * @param marker the marker data specific to this log statement 1536 * @param message the message to log; the format depends on the message factory. 1537 * @param p0 parameter to the message. 1538 * @param p1 parameter to the message. 1539 * @param p2 parameter to the message. 1540 * @param p3 parameter to the message. 1541 * @param p4 parameter to the message. 1542 * @param p5 parameter to the message. 1543 */ 1544 void fatal(Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5); 1545 1546 /** 1547 * Logs a message with parameters at fatal level. 1548 * 1549 * @param marker the marker data specific to this log statement 1550 * @param message the message to log; the format depends on the message factory. 1551 * @param p0 parameter to the message. 1552 * @param p1 parameter to the message. 1553 * @param p2 parameter to the message. 1554 * @param p3 parameter to the message. 1555 * @param p4 parameter to the message. 1556 * @param p5 parameter to the message. 1557 * @param p6 parameter to the message. 1558 */ 1559 void fatal(Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, 1560 Object p6); 1561 1562 /** 1563 * Logs a message with parameters at fatal level. 1564 * 1565 * @param marker the marker data specific to this log statement 1566 * @param message the message to log; the format depends on the message factory. 1567 * @param p0 parameter to the message. 1568 * @param p1 parameter to the message. 1569 * @param p2 parameter to the message. 1570 * @param p3 parameter to the message. 1571 * @param p4 parameter to the message. 1572 * @param p5 parameter to the message. 1573 * @param p6 parameter to the message. 1574 * @param p7 parameter to the message. 1575 */ 1576 void fatal(Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, 1577 Object p7); 1578 1579 /** 1580 * Logs a message with parameters at fatal level. 1581 * 1582 * @param marker the marker data specific to this log statement 1583 * @param message the message to log; the format depends on the message factory. 1584 * @param p0 parameter to the message. 1585 * @param p1 parameter to the message. 1586 * @param p2 parameter to the message. 1587 * @param p3 parameter to the message. 1588 * @param p4 parameter to the message. 1589 * @param p5 parameter to the message. 1590 * @param p6 parameter to the message. 1591 * @param p7 parameter to the message. 1592 * @param p8 parameter to the message. 1593 */ 1594 void fatal(Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, 1595 Object p7, Object p8); 1596 1597 /** 1598 * Logs a message with parameters at fatal level. 1599 * 1600 * @param marker the marker data specific to this log statement 1601 * @param message the message to log; the format depends on the message factory. 1602 * @param p0 parameter to the message. 1603 * @param p1 parameter to the message. 1604 * @param p2 parameter to the message. 1605 * @param p3 parameter to the message. 1606 * @param p4 parameter to the message. 1607 * @param p5 parameter to the message. 1608 * @param p6 parameter to the message. 1609 * @param p7 parameter to the message. 1610 * @param p8 parameter to the message. 1611 * @param p9 parameter to the message. 1612 */ 1613 void fatal(Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, 1614 Object p7, Object p8, Object p9); 1615 1616 /** 1617 * Logs a message with parameters at fatal level. 1618 * 1619 * @param message the message to log; the format depends on the message factory. 1620 * @param p0 parameter to the message. 1621 */ 1622 void fatal(String message, Object p0); 1623 1624 /** 1625 * Logs a message with parameters at fatal level. 1626 * 1627 * @param message the message to log; the format depends on the message factory. 1628 * @param p0 parameter to the message. 1629 * @param p1 parameter to the message. 1630 */ 1631 void fatal(String message, Object p0, Object p1); 1632 1633 /** 1634 * Logs a message with parameters at fatal level. 1635 * 1636 * @param message the message to log; the format depends on the message factory. 1637 * @param p0 parameter to the message. 1638 * @param p1 parameter to the message. 1639 * @param p2 parameter to the message. 1640 */ 1641 void fatal(String message, Object p0, Object p1, Object p2); 1642 1643 /** 1644 * Logs a message with parameters at fatal level. 1645 * 1646 * @param message the message to log; the format depends on the message factory. 1647 * @param p0 parameter to the message. 1648 * @param p1 parameter to the message. 1649 * @param p2 parameter to the message. 1650 * @param p3 parameter to the message. 1651 */ 1652 void fatal(String message, Object p0, Object p1, Object p2, Object p3); 1653 1654 /** 1655 * Logs a message with parameters at fatal level. 1656 * 1657 * @param message the message to log; the format depends on the message factory. 1658 * @param p0 parameter to the message. 1659 * @param p1 parameter to the message. 1660 * @param p2 parameter to the message. 1661 * @param p3 parameter to the message. 1662 * @param p4 parameter to the message. 1663 */ 1664 void fatal(String message, Object p0, Object p1, Object p2, Object p3, Object p4); 1665 1666 /** 1667 * Logs a message with parameters at fatal level. 1668 * 1669 * @param message the message to log; the format depends on the message factory. 1670 * @param p0 parameter to the message. 1671 * @param p1 parameter to the message. 1672 * @param p2 parameter to the message. 1673 * @param p3 parameter to the message. 1674 * @param p4 parameter to the message. 1675 * @param p5 parameter to the message. 1676 */ 1677 void fatal(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5); 1678 1679 /** 1680 * Logs a message with parameters at fatal level. 1681 * 1682 * @param message the message to log; the format depends on the message factory. 1683 * @param p0 parameter to the message. 1684 * @param p1 parameter to the message. 1685 * @param p2 parameter to the message. 1686 * @param p3 parameter to the message. 1687 * @param p4 parameter to the message. 1688 * @param p5 parameter to the message. 1689 * @param p6 parameter to the message. 1690 */ 1691 void fatal(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6); 1692 1693 /** 1694 * Logs a message with parameters at fatal level. 1695 * 1696 * @param message the message to log; the format depends on the message factory. 1697 * @param p0 parameter to the message. 1698 * @param p1 parameter to the message. 1699 * @param p2 parameter to the message. 1700 * @param p3 parameter to the message. 1701 * @param p4 parameter to the message. 1702 * @param p5 parameter to the message. 1703 * @param p6 parameter to the message. 1704 * @param p7 parameter to the message. 1705 */ 1706 void fatal(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7); 1707 1708 /** 1709 * Logs a message with parameters at fatal level. 1710 * 1711 * @param message the message to log; the format depends on the message factory. 1712 * @param p0 parameter to the message. 1713 * @param p1 parameter to the message. 1714 * @param p2 parameter to the message. 1715 * @param p3 parameter to the message. 1716 * @param p4 parameter to the message. 1717 * @param p5 parameter to the message. 1718 * @param p6 parameter to the message. 1719 * @param p7 parameter to the message. 1720 * @param p8 parameter to the message. 1721 */ 1722 void fatal(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7, 1723 Object p8); 1724 1725 /** 1726 * Logs a message with parameters at fatal level. 1727 * 1728 * @param message the message to log; the format depends on the message factory. 1729 * @param p0 parameter to the message. 1730 * @param p1 parameter to the message. 1731 * @param p2 parameter to the message. 1732 * @param p3 parameter to the message. 1733 * @param p4 parameter to the message. 1734 * @param p5 parameter to the message. 1735 * @param p6 parameter to the message. 1736 * @param p7 parameter to the message. 1737 * @param p8 parameter to the message. 1738 * @param p9 parameter to the message. 1739 */ 1740 void fatal(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7, 1741 Object p8, Object p9); 1742 1743 /** 1744 * Gets the Level associated with the Logger. 1745 * 1746 * @return the Level associate with the Logger. 1747 */ 1748 Level getLevel(); 1749 1750 /** 1751 * Gets the message factory used to convert message Objects and Strings/CharSequences into actual log Messages. 1752 * 1753 * Since version 2.6, Log4j internally uses message factories that implement the {@link MessageFactory2} interface. 1754 * From version 2.6.2, the return type of this method was changed from {@link MessageFactory} to 1755 * {@code <MF extends MessageFactory> MF}. The returned factory will always implement {@link MessageFactory2}, 1756 * but the return type of this method could not be changed to {@link MessageFactory2} without breaking binary 1757 * compatibility. 1758 * 1759 * @return the message factory, as an instance of {@link MessageFactory2} 1760 */ 1761 <MF extends MessageFactory> MF getMessageFactory(); 1762 1763 /** 1764 * Gets the logger name. 1765 * 1766 * @return the logger name. 1767 */ 1768 String getName(); 1769 1770 /** 1771 * Logs a message with the specific Marker at the {@link Level#INFO INFO} level. 1772 * 1773 * @param marker the marker data specific to this log statement 1774 * @param msg the message string to be logged 1775 */ 1776 void info(Marker marker, Message msg); 1777 1778 /** 1779 * Logs a message with the specific Marker at the {@link Level#INFO INFO} level. 1780 * 1781 * @param marker the marker data specific to this log statement 1782 * @param msg the message string to be logged 1783 * @param t A Throwable or null. 1784 */ 1785 void info(Marker marker, Message msg, Throwable t); 1786 1787 /** 1788 * Logs a message which is only to be constructed if the logging level is the {@link Level#INFO INFO} level with the 1789 * specified Marker. The {@code MessageSupplier} may or may not use the {@link MessageFactory} to construct the 1790 * {@code Message}. 1791 * 1792 * @param marker the marker data specific to this log statement 1793 * @param msgSupplier A function, which when called, produces the desired log message. 1794 * @since 2.4 1795 * @deprecated Deprecated in 2.6, use the {@link Supplier} version of this API instead. 1796 */ 1797 @Deprecated 1798 void info(Marker marker, MessageSupplier msgSupplier); 1799 1800 /** 1801 * Logs a message (only to be constructed if the logging level is the {@link Level#INFO INFO} level) with the 1802 * specified Marker and including the stack trace of the {@link Throwable} <code>t</code> passed as parameter. The 1803 * {@code MessageSupplier} may or may not use the {@link MessageFactory} to construct the {@code Message}. 1804 * 1805 * @param marker the marker data specific to this log statement 1806 * @param msgSupplier A function, which when called, produces the desired log message. 1807 * @param t A Throwable or null. 1808 * @since 2.4 1809 * @deprecated Deprecated in 2.6, use the {@link Supplier} version of this API instead. 1810 */ 1811 @Deprecated 1812 void info(Marker marker, MessageSupplier msgSupplier, Throwable t); 1813 1814 /** 1815 * Logs a message CharSequence with the {@link Level#INFO INFO} level. 1816 * 1817 * @param marker the marker data specific to this log statement 1818 * @param message the message CharSequence to log. 1819 */ 1820 void info(Marker marker, CharSequence message); 1821 1822 /** 1823 * Logs a CharSequence at the {@link Level#INFO INFO} level including the stack trace of the {@link Throwable} 1824 * <code>t</code> passed as parameter. 1825 * 1826 * @param marker the marker data specific to this log statement 1827 * @param message the message CharSequence to log. 1828 * @param t the exception to log, including its stack trace. 1829 */ 1830 void info(Marker marker, CharSequence message, Throwable t); 1831 1832 /** 1833 * Logs a message object with the {@link Level#INFO INFO} level. 1834 * 1835 * @param marker the marker data specific to this log statement 1836 * @param message the message object to log. 1837 */ 1838 void info(Marker marker, Object message); 1839 1840 /** 1841 * Logs a message at the {@link Level#INFO INFO} level including the stack trace of the {@link Throwable} 1842 * <code>t</code> passed as parameter. 1843 * 1844 * @param marker the marker data specific to this log statement 1845 * @param message the message object to log. 1846 * @param t the exception to log, including its stack trace. 1847 */ 1848 void info(Marker marker, Object message, Throwable t); 1849 1850 /** 1851 * Logs a message object with the {@link Level#INFO INFO} level. 1852 * 1853 * @param marker the marker data specific to this log statement 1854 * @param message the message object to log. 1855 */ 1856 void info(Marker marker, String message); 1857 1858 /** 1859 * Logs a message with parameters at the {@link Level#INFO INFO} level. 1860 * 1861 * @param marker the marker data specific to this log statement 1862 * @param message the message to log; the format depends on the message factory. 1863 * @param params parameters to the message. 1864 * @see #getMessageFactory() 1865 */ 1866 void info(Marker marker, String message, Object... params); 1867 1868 /** 1869 * Logs a message with parameters which are only to be constructed if the logging level is the {@link Level#INFO 1870 * INFO} level. 1871 * 1872 * @param marker the marker data specific to this log statement 1873 * @param message the message to log; the format depends on the message factory. 1874 * @param paramSuppliers An array of functions, which when called, produce the desired log message parameters. 1875 * @since 2.4 1876 */ 1877 void info(Marker marker, String message, Supplier<?>... paramSuppliers); 1878 1879 /** 1880 * Logs a message at the {@link Level#INFO INFO} level including the stack trace of the {@link Throwable} 1881 * <code>t</code> passed as parameter. 1882 * 1883 * @param marker the marker data specific to this log statement 1884 * @param message the message object to log. 1885 * @param t the exception to log, including its stack trace. 1886 */ 1887 void info(Marker marker, String message, Throwable t); 1888 1889 /** 1890 * Logs a message which is only to be constructed if the logging level is the {@link Level#INFO INFO} level with the 1891 * specified Marker. 1892 * 1893 * @param marker the marker data specific to this log statement 1894 * @param msgSupplier A function, which when called, produces the desired log message; the format depends on the 1895 * message factory. 1896 * @since 2.4 1897 */ 1898 void info(Marker marker, Supplier<?> msgSupplier); 1899 1900 /** 1901 * Logs a message (only to be constructed if the logging level is the {@link Level#INFO INFO} level) with the 1902 * specified Marker and including the stack trace of the {@link Throwable} <code>t</code> passed as parameter. 1903 * 1904 * @param marker the marker data specific to this log statement 1905 * @param msgSupplier A function, which when called, produces the desired log message; the format depends on the 1906 * message factory. 1907 * @param t A Throwable or null. 1908 * @since 2.4 1909 */ 1910 void info(Marker marker, Supplier<?> msgSupplier, Throwable t); 1911 1912 /** 1913 * Logs a message with the specific Marker at the {@link Level#INFO INFO} level. 1914 * 1915 * @param msg the message string to be logged 1916 */ 1917 void info(Message msg); 1918 1919 /** 1920 * Logs a message with the specific Marker at the {@link Level#INFO INFO} level. 1921 * 1922 * @param msg the message string to be logged 1923 * @param t A Throwable or null. 1924 */ 1925 void info(Message msg, Throwable t); 1926 1927 /** 1928 * Logs a message which is only to be constructed if the logging level is the {@link Level#INFO INFO} level. The 1929 * {@code MessageSupplier} may or may not use the {@link MessageFactory} to construct the {@code Message}. 1930 * 1931 * @param msgSupplier A function, which when called, produces the desired log message. 1932 * @since 2.4 1933 * @deprecated Deprecated in 2.6, use the {@link Supplier} version of this API instead. 1934 */ 1935 @Deprecated 1936 void info(MessageSupplier msgSupplier); 1937 1938 /** 1939 * Logs a message (only to be constructed if the logging level is the {@link Level#INFO INFO} level) including the 1940 * stack trace of the {@link Throwable} <code>t</code> passed as parameter. The {@code MessageSupplier} may or may 1941 * not use the {@link MessageFactory} to construct the {@code Message}. 1942 * 1943 * @param msgSupplier A function, which when called, produces the desired log message. 1944 * @param t the exception to log, including its stack trace. 1945 * @since 2.4 1946 * @deprecated Deprecated in 2.6, use the {@link Supplier} version of this API instead. 1947 */ 1948 @Deprecated 1949 void info(MessageSupplier msgSupplier, Throwable t); 1950 1951 /** 1952 * Logs a message CharSequence with the {@link Level#INFO INFO} level. 1953 * 1954 * @param message the message CharSequence to log. 1955 */ 1956 void info(CharSequence message); 1957 1958 /** 1959 * Logs a CharSequence at the {@link Level#INFO INFO} level including the stack trace of the {@link Throwable} 1960 * <code>t</code> passed as parameter. 1961 * 1962 * @param message the message CharSequence to log. 1963 * @param t the exception to log, including its stack trace. 1964 */ 1965 void info(CharSequence message, Throwable t); 1966 1967 /** 1968 * Logs a message object with the {@link Level#INFO INFO} level. 1969 * 1970 * @param message the message object to log. 1971 */ 1972 void info(Object message); 1973 1974 /** 1975 * Logs a message at the {@link Level#INFO INFO} level including the stack trace of the {@link Throwable} 1976 * <code>t</code> passed as parameter. 1977 * 1978 * @param message the message object to log. 1979 * @param t the exception to log, including its stack trace. 1980 */ 1981 void info(Object message, Throwable t); 1982 1983 /** 1984 * Logs a message object with the {@link Level#INFO INFO} level. 1985 * 1986 * @param message the message string to log. 1987 */ 1988 void info(String message); 1989 1990 /** 1991 * Logs a message with parameters at the {@link Level#INFO INFO} level. 1992 * 1993 * @param message the message to log; the format depends on the message factory. 1994 * @param params parameters to the message. 1995 * @see #getMessageFactory() 1996 */ 1997 void info(String message, Object... params); 1998 1999 /** 2000 * Logs a message with parameters which are only to be constructed if the logging level is the {@link Level#INFO 2001 * INFO} level. 2002 * 2003 * @param message the message to log; the format depends on the message factory. 2004 * @param paramSuppliers An array of functions, which when called, produce the desired log message parameters. 2005 * @since 2.4 2006 */ 2007 void info(String message, Supplier<?>... paramSuppliers); 2008 2009 /** 2010 * Logs a message at the {@link Level#INFO INFO} level including the stack trace of the {@link Throwable} 2011 * <code>t</code> passed as parameter. 2012 * 2013 * @param message the message object to log. 2014 * @param t the exception to log, including its stack trace. 2015 */ 2016 void info(String message, Throwable t); 2017 2018 /** 2019 * Logs a message which is only to be constructed if the logging level is the {@link Level#INFO INFO} level. 2020 * 2021 * @param msgSupplier A function, which when called, produces the desired log message; the format depends on the 2022 * message factory. 2023 * @since 2.4 2024 */ 2025 void info(Supplier<?> msgSupplier); 2026 2027 /** 2028 * Logs a message (only to be constructed if the logging level is the {@link Level#INFO INFO} level) including the 2029 * stack trace of the {@link Throwable} <code>t</code> passed as parameter. 2030 * 2031 * @param msgSupplier A function, which when called, produces the desired log message; the format depends on the 2032 * message factory. 2033 * @param t the exception to log, including its stack trace. 2034 * @since 2.4 2035 */ 2036 void info(Supplier<?> msgSupplier, Throwable t); 2037 2038 /** 2039 * Logs a message with parameters at info level. 2040 * 2041 * @param marker the marker data specific to this log statement 2042 * @param message the message to log; the format depends on the message factory. 2043 * @param p0 parameter to the message. 2044 */ 2045 void info(Marker marker, String message, Object p0); 2046 2047 /** 2048 * Logs a message with parameters at info level. 2049 * 2050 * @param marker the marker data specific to this log statement 2051 * @param message the message to log; the format depends on the message factory. 2052 * @param p0 parameter to the message. 2053 * @param p1 parameter to the message. 2054 */ 2055 void info(Marker marker, String message, Object p0, Object p1); 2056 2057 /** 2058 * Logs a message with parameters at info level. 2059 * 2060 * @param marker the marker data specific to this log statement 2061 * @param message the message to log; the format depends on the message factory. 2062 * @param p0 parameter to the message. 2063 * @param p1 parameter to the message. 2064 * @param p2 parameter to the message. 2065 */ 2066 void info(Marker marker, String message, Object p0, Object p1, Object p2); 2067 2068 /** 2069 * Logs a message with parameters at info level. 2070 * 2071 * @param marker the marker data specific to this log statement 2072 * @param message the message to log; the format depends on the message factory. 2073 * @param p0 parameter to the message. 2074 * @param p1 parameter to the message. 2075 * @param p2 parameter to the message. 2076 * @param p3 parameter to the message. 2077 */ 2078 void info(Marker marker, String message, Object p0, Object p1, Object p2, Object p3); 2079 2080 /** 2081 * Logs a message with parameters at info level. 2082 * 2083 * @param marker the marker data specific to this log statement 2084 * @param message the message to log; the format depends on the message factory. 2085 * @param p0 parameter to the message. 2086 * @param p1 parameter to the message. 2087 * @param p2 parameter to the message. 2088 * @param p3 parameter to the message. 2089 * @param p4 parameter to the message. 2090 */ 2091 void info(Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4); 2092 2093 /** 2094 * Logs a message with parameters at info level. 2095 * 2096 * @param marker the marker data specific to this log statement 2097 * @param message the message to log; the format depends on the message factory. 2098 * @param p0 parameter to the message. 2099 * @param p1 parameter to the message. 2100 * @param p2 parameter to the message. 2101 * @param p3 parameter to the message. 2102 * @param p4 parameter to the message. 2103 * @param p5 parameter to the message. 2104 */ 2105 void info(Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5); 2106 2107 /** 2108 * Logs a message with parameters at info level. 2109 * 2110 * @param marker the marker data specific to this log statement 2111 * @param message the message to log; the format depends on the message factory. 2112 * @param p0 parameter to the message. 2113 * @param p1 parameter to the message. 2114 * @param p2 parameter to the message. 2115 * @param p3 parameter to the message. 2116 * @param p4 parameter to the message. 2117 * @param p5 parameter to the message. 2118 * @param p6 parameter to the message. 2119 */ 2120 void info(Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, 2121 Object p6); 2122 2123 /** 2124 * Logs a message with parameters at info level. 2125 * 2126 * @param marker the marker data specific to this log statement 2127 * @param message the message to log; the format depends on the message factory. 2128 * @param p0 parameter to the message. 2129 * @param p1 parameter to the message. 2130 * @param p2 parameter to the message. 2131 * @param p3 parameter to the message. 2132 * @param p4 parameter to the message. 2133 * @param p5 parameter to the message. 2134 * @param p6 parameter to the message. 2135 * @param p7 parameter to the message. 2136 */ 2137 void info(Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, 2138 Object p7); 2139 2140 /** 2141 * Logs a message with parameters at info level. 2142 * 2143 * @param marker the marker data specific to this log statement 2144 * @param message the message to log; the format depends on the message factory. 2145 * @param p0 parameter to the message. 2146 * @param p1 parameter to the message. 2147 * @param p2 parameter to the message. 2148 * @param p3 parameter to the message. 2149 * @param p4 parameter to the message. 2150 * @param p5 parameter to the message. 2151 * @param p6 parameter to the message. 2152 * @param p7 parameter to the message. 2153 * @param p8 parameter to the message. 2154 */ 2155 void info(Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, 2156 Object p7, Object p8); 2157 2158 /** 2159 * Logs a message with parameters at info level. 2160 * 2161 * @param marker the marker data specific to this log statement 2162 * @param message the message to log; the format depends on the message factory. 2163 * @param p0 parameter to the message. 2164 * @param p1 parameter to the message. 2165 * @param p2 parameter to the message. 2166 * @param p3 parameter to the message. 2167 * @param p4 parameter to the message. 2168 * @param p5 parameter to the message. 2169 * @param p6 parameter to the message. 2170 * @param p7 parameter to the message. 2171 * @param p8 parameter to the message. 2172 * @param p9 parameter to the message. 2173 */ 2174 void info(Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, 2175 Object p7, Object p8, Object p9); 2176 2177 /** 2178 * Logs a message with parameters at info level. 2179 * 2180 * @param message the message to log; the format depends on the message factory. 2181 * @param p0 parameter to the message. 2182 */ 2183 void info(String message, Object p0); 2184 2185 /** 2186 * Logs a message with parameters at info level. 2187 * 2188 * @param message the message to log; the format depends on the message factory. 2189 * @param p0 parameter to the message. 2190 * @param p1 parameter to the message. 2191 */ 2192 void info(String message, Object p0, Object p1); 2193 2194 /** 2195 * Logs a message with parameters at info level. 2196 * 2197 * @param message the message to log; the format depends on the message factory. 2198 * @param p0 parameter to the message. 2199 * @param p1 parameter to the message. 2200 * @param p2 parameter to the message. 2201 */ 2202 void info(String message, Object p0, Object p1, Object p2); 2203 2204 /** 2205 * Logs a message with parameters at info level. 2206 * 2207 * @param message the message to log; the format depends on the message factory. 2208 * @param p0 parameter to the message. 2209 * @param p1 parameter to the message. 2210 * @param p2 parameter to the message. 2211 * @param p3 parameter to the message. 2212 */ 2213 void info(String message, Object p0, Object p1, Object p2, Object p3); 2214 2215 /** 2216 * Logs a message with parameters at info level. 2217 * 2218 * @param message the message to log; the format depends on the message factory. 2219 * @param p0 parameter to the message. 2220 * @param p1 parameter to the message. 2221 * @param p2 parameter to the message. 2222 * @param p3 parameter to the message. 2223 * @param p4 parameter to the message. 2224 */ 2225 void info(String message, Object p0, Object p1, Object p2, Object p3, Object p4); 2226 2227 /** 2228 * Logs a message with parameters at info level. 2229 * 2230 * @param message the message to log; the format depends on the message factory. 2231 * @param p0 parameter to the message. 2232 * @param p1 parameter to the message. 2233 * @param p2 parameter to the message. 2234 * @param p3 parameter to the message. 2235 * @param p4 parameter to the message. 2236 * @param p5 parameter to the message. 2237 */ 2238 void info(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5); 2239 2240 /** 2241 * Logs a message with parameters at info level. 2242 * 2243 * @param message the message to log; the format depends on the message factory. 2244 * @param p0 parameter to the message. 2245 * @param p1 parameter to the message. 2246 * @param p2 parameter to the message. 2247 * @param p3 parameter to the message. 2248 * @param p4 parameter to the message. 2249 * @param p5 parameter to the message. 2250 * @param p6 parameter to the message. 2251 */ 2252 void info(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6); 2253 2254 /** 2255 * Logs a message with parameters at info level. 2256 * 2257 * @param message the message to log; the format depends on the message factory. 2258 * @param p0 parameter to the message. 2259 * @param p1 parameter to the message. 2260 * @param p2 parameter to the message. 2261 * @param p3 parameter to the message. 2262 * @param p4 parameter to the message. 2263 * @param p5 parameter to the message. 2264 * @param p6 parameter to the message. 2265 * @param p7 parameter to the message. 2266 */ 2267 void info(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7); 2268 2269 /** 2270 * Logs a message with parameters at info level. 2271 * 2272 * @param message the message to log; the format depends on the message factory. 2273 * @param p0 parameter to the message. 2274 * @param p1 parameter to the message. 2275 * @param p2 parameter to the message. 2276 * @param p3 parameter to the message. 2277 * @param p4 parameter to the message. 2278 * @param p5 parameter to the message. 2279 * @param p6 parameter to the message. 2280 * @param p7 parameter to the message. 2281 * @param p8 parameter to the message. 2282 */ 2283 void info(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7, 2284 Object p8); 2285 2286 /** 2287 * Logs a message with parameters at info level. 2288 * 2289 * @param message the message to log; the format depends on the message factory. 2290 * @param p0 parameter to the message. 2291 * @param p1 parameter to the message. 2292 * @param p2 parameter to the message. 2293 * @param p3 parameter to the message. 2294 * @param p4 parameter to the message. 2295 * @param p5 parameter to the message. 2296 * @param p6 parameter to the message. 2297 * @param p7 parameter to the message. 2298 * @param p8 parameter to the message. 2299 * @param p9 parameter to the message. 2300 */ 2301 void info(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7, 2302 Object p8, Object p9); 2303 2304 /** 2305 * Checks whether this Logger is enabled for the {@link Level#DEBUG DEBUG} Level. 2306 * 2307 * @return boolean - {@code true} if this Logger is enabled for level DEBUG, {@code false} otherwise. 2308 */ 2309 boolean isDebugEnabled(); 2310 2311 /** 2312 * Checks whether this Logger is enabled for the {@link Level#DEBUG DEBUG} Level. 2313 * 2314 * @param marker The Marker to check 2315 * @return boolean - {@code true} if this Logger is enabled for level DEBUG, {@code false} otherwise. 2316 */ 2317 boolean isDebugEnabled(Marker marker); 2318 2319 /** 2320 * Checks whether this Logger is enabled for the given Level. 2321 * <p> 2322 * Note that passing in {@link Level#OFF OFF} always returns {@code true}. 2323 * </p> 2324 * 2325 * @param level the Level to check 2326 * @return boolean - {@code true} if this Logger is enabled for level, {@code false} otherwise. 2327 */ 2328 boolean isEnabled(Level level); 2329 2330 /** 2331 * Checks whether this Logger is enabled for the given Level and Marker. 2332 * 2333 * @param level The Level to check 2334 * @param marker The Marker to check 2335 * @return boolean - {@code true} if this Logger is enabled for level and marker, {@code false} otherwise. 2336 */ 2337 boolean isEnabled(Level level, Marker marker); 2338 2339 /** 2340 * Checks whether this Logger is enabled for the {@link Level#ERROR ERROR} Level. 2341 * 2342 * @return boolean - {@code true} if this Logger is enabled for level {@link Level#ERROR ERROR}, {@code false} 2343 * otherwise. 2344 */ 2345 boolean isErrorEnabled(); 2346 2347 /** 2348 * Checks whether this Logger is enabled for the {@link Level#ERROR ERROR} Level. 2349 * 2350 * @param marker The Marker to check 2351 * @return boolean - {@code true} if this Logger is enabled for level {@link Level#ERROR ERROR}, {@code false} 2352 * otherwise. 2353 */ 2354 boolean isErrorEnabled(Marker marker); 2355 2356 /** 2357 * Checks whether this Logger is enabled for the {@link Level#FATAL FATAL} Level. 2358 * 2359 * @return boolean - {@code true} if this Logger is enabled for level {@link Level#FATAL FATAL}, {@code false} 2360 * otherwise. 2361 */ 2362 boolean isFatalEnabled(); 2363 2364 /** 2365 * Checks whether this Logger is enabled for the {@link Level#FATAL FATAL} Level. 2366 * 2367 * @param marker The Marker to check 2368 * @return boolean - {@code true} if this Logger is enabled for level {@link Level#FATAL FATAL}, {@code false} 2369 * otherwise. 2370 */ 2371 boolean isFatalEnabled(Marker marker); 2372 2373 /** 2374 * Checks whether this Logger is enabled for the {@link Level#INFO INFO} Level. 2375 * 2376 * @return boolean - {@code true} if this Logger is enabled for level INFO, {@code false} otherwise. 2377 */ 2378 boolean isInfoEnabled(); 2379 2380 /** 2381 * Checks whether this Logger is enabled for the {@link Level#INFO INFO} Level. 2382 * 2383 * @param marker The Marker to check 2384 * @return boolean - {@code true} if this Logger is enabled for level INFO, {@code false} otherwise. 2385 */ 2386 boolean isInfoEnabled(Marker marker); 2387 2388 /** 2389 * Checks whether this Logger is enabled for the {@link Level#TRACE TRACE} level. 2390 * 2391 * @return boolean - {@code true} if this Logger is enabled for level TRACE, {@code false} otherwise. 2392 */ 2393 boolean isTraceEnabled(); 2394 2395 /** 2396 * Checks whether this Logger is enabled for the {@link Level#TRACE TRACE} level. 2397 * 2398 * @param marker The Marker to check 2399 * @return boolean - {@code true} if this Logger is enabled for level TRACE, {@code false} otherwise. 2400 */ 2401 boolean isTraceEnabled(Marker marker); 2402 2403 /** 2404 * Checks whether this Logger is enabled for the {@link Level#WARN WARN} Level. 2405 * 2406 * @return boolean - {@code true} if this Logger is enabled for level {@link Level#WARN WARN}, {@code false} 2407 * otherwise. 2408 */ 2409 boolean isWarnEnabled(); 2410 2411 /** 2412 * Checks whether this Logger is enabled for the {@link Level#WARN WARN} Level. 2413 * 2414 * @param marker The Marker to check 2415 * @return boolean - {@code true} if this Logger is enabled for level {@link Level#WARN WARN}, {@code false} 2416 * otherwise. 2417 */ 2418 boolean isWarnEnabled(Marker marker); 2419 2420 /** 2421 * Logs a message with the specific Marker at the given level. 2422 * 2423 * @param level the logging level 2424 * @param marker the marker data specific to this log statement 2425 * @param msg the message string to be logged 2426 */ 2427 void log(Level level, Marker marker, Message msg); 2428 2429 /** 2430 * Logs a message with the specific Marker at the given level. 2431 * 2432 * @param level the logging level 2433 * @param marker the marker data specific to this log statement 2434 * @param msg the message string to be logged 2435 * @param t A Throwable or null. 2436 */ 2437 void log(Level level, Marker marker, Message msg, Throwable t); 2438 2439 /** 2440 * Logs a message which is only to be constructed if the logging level is the specified level with the specified 2441 * Marker. The {@code MessageSupplier} may or may not use the {@link MessageFactory} to construct the 2442 * {@code Message}. 2443 * 2444 * @param level the logging level 2445 * @param marker the marker data specific to this log statement 2446 * @param msgSupplier A function, which when called, produces the desired log message. 2447 * @since 2.4 2448 * @deprecated Deprecated in 2.6, use the {@link Supplier} version of this API instead. 2449 */ 2450 @Deprecated 2451 void log(Level level, Marker marker, MessageSupplier msgSupplier); 2452 2453 /** 2454 * Logs a message (only to be constructed if the logging level is the specified level) with the specified Marker and 2455 * including the stack log of the {@link Throwable} <code>t</code> passed as parameter. The {@code MessageSupplier} 2456 * may or may not use the {@link MessageFactory} to construct the {@code Message}. 2457 * 2458 * @param level the logging level 2459 * @param marker the marker data specific to this log statement 2460 * @param msgSupplier A function, which when called, produces the desired log message. 2461 * @param t A Throwable or null. 2462 * @since 2.4 2463 * @deprecated Deprecated in 2.6, use the {@link Supplier} version of this API instead. 2464 */ 2465 @Deprecated 2466 void log(Level level, Marker marker, MessageSupplier msgSupplier, Throwable t); 2467 2468 /** 2469 * Logs a message CharSequence with the given level. 2470 * 2471 * @param level the logging level 2472 * @param marker the marker data specific to this log statement 2473 * @param message the message CharSequence to log. 2474 */ 2475 void log(Level level, Marker marker, CharSequence message); 2476 2477 /** 2478 * Logs a CharSequence at the given level including the stack trace of the {@link Throwable} <code>t</code> passed as 2479 * parameter. 2480 * 2481 * @param level the logging level 2482 * @param marker the marker data specific to this log statement 2483 * @param message the message CharSequence to log. 2484 * @param t the exception to log, including its stack trace. 2485 */ 2486 void log(Level level, Marker marker, CharSequence message, Throwable t); 2487 2488 /** 2489 * Logs a message object with the given level. 2490 * 2491 * @param level the logging level 2492 * @param marker the marker data specific to this log statement 2493 * @param message the message object to log. 2494 */ 2495 void log(Level level, Marker marker, Object message); 2496 2497 /** 2498 * Logs a message at the given level including the stack trace of the {@link Throwable} <code>t</code> passed as 2499 * parameter. 2500 * 2501 * @param level the logging level 2502 * @param marker the marker data specific to this log statement 2503 * @param message the message to log. 2504 * @param t the exception to log, including its stack trace. 2505 */ 2506 void log(Level level, Marker marker, Object message, Throwable t); 2507 2508 /** 2509 * Logs a message object with the given level. 2510 * 2511 * @param level the logging level 2512 * @param marker the marker data specific to this log statement 2513 * @param message the message object to log. 2514 */ 2515 void log(Level level, Marker marker, String message); 2516 2517 /** 2518 * Logs a message with parameters at the given level. 2519 * 2520 * @param level the logging level 2521 * @param marker the marker data specific to this log statement 2522 * @param message the message to log; the format depends on the message factory. 2523 * @param params parameters to the message. 2524 * @see #getMessageFactory() 2525 */ 2526 void log(Level level, Marker marker, String message, Object... params); 2527 2528 /** 2529 * Logs a message with parameters which are only to be constructed if the logging level is the specified level. 2530 * 2531 * @param level the logging level 2532 * @param marker the marker data specific to this log statement 2533 * @param message the message to log; the format depends on the message factory. 2534 * @param paramSuppliers An array of functions, which when called, produce the desired log message parameters. 2535 * @since 2.4 2536 */ 2537 void log(Level level, Marker marker, String message, Supplier<?>... paramSuppliers); 2538 2539 /** 2540 * Logs a message at the given level including the stack trace of the {@link Throwable} <code>t</code> passed as 2541 * parameter. 2542 * 2543 * @param level the logging level 2544 * @param marker the marker data specific to this log statement 2545 * @param message the message to log. 2546 * @param t the exception to log, including its stack trace. 2547 */ 2548 void log(Level level, Marker marker, String message, Throwable t); 2549 2550 /** 2551 * Logs a message (only to be constructed if the logging level is the specified level) with the specified Marker. 2552 * 2553 * @param level the logging level 2554 * @param marker the marker data specific to this log statement 2555 * @param msgSupplier A function, which when called, produces the desired log message; the format depends on the 2556 * message factory. 2557 * @since 2.4 2558 */ 2559 void log(Level level, Marker marker, Supplier<?> msgSupplier); 2560 2561 /** 2562 * Logs a message (only to be constructed if the logging level is the specified level) with the specified Marker and 2563 * including the stack log of the {@link Throwable} <code>t</code> passed as parameter. 2564 * 2565 * @param level the logging level 2566 * @param marker the marker data specific to this log statement 2567 * @param msgSupplier A function, which when called, produces the desired log message; the format depends on the 2568 * message factory. 2569 * @param t A Throwable or null. 2570 * @since 2.4 2571 */ 2572 void log(Level level, Marker marker, Supplier<?> msgSupplier, Throwable t); 2573 2574 /** 2575 * Logs a message with the specific Marker at the given level. 2576 * 2577 * @param level the logging level 2578 * @param msg the message string to be logged 2579 */ 2580 void log(Level level, Message msg); 2581 2582 /** 2583 * Logs a message with the specific Marker at the given level. 2584 * 2585 * @param level the logging level 2586 * @param msg the message string to be logged 2587 * @param t A Throwable or null. 2588 */ 2589 void log(Level level, Message msg, Throwable t); 2590 2591 /** 2592 * Logs a message which is only to be constructed if the logging level is the specified level. The 2593 * {@code MessageSupplier} may or may not use the {@link MessageFactory} to construct the {@code Message}. 2594 * 2595 * @param level the logging level 2596 * @param msgSupplier A function, which when called, produces the desired log message. 2597 * @since 2.4 2598 * @deprecated Deprecated in 2.6, use the {@link Supplier} version of this API instead. 2599 */ 2600 @Deprecated 2601 void log(Level level, MessageSupplier msgSupplier); 2602 2603 /** 2604 * Logs a message (only to be constructed if the logging level is the specified level) including the stack log of 2605 * the {@link Throwable} <code>t</code> passed as parameter. The {@code MessageSupplier} may or may not use the 2606 * {@link MessageFactory} to construct the {@code Message}. 2607 * 2608 * @param level the logging level 2609 * @param msgSupplier A function, which when called, produces the desired log message. 2610 * @param t the exception to log, including its stack log. 2611 * @since 2.4 2612 * @deprecated Deprecated in 2.6, use the {@link Supplier} version of this API instead. 2613 */ 2614 @Deprecated 2615 void log(Level level, MessageSupplier msgSupplier, Throwable t); 2616 2617 /** 2618 * Logs a message CharSequence with the given level. 2619 * 2620 * @param level the logging level 2621 * @param message the message CharSequence to log. 2622 */ 2623 void log(Level level, CharSequence message); 2624 2625 /** 2626 * Logs a CharSequence at the given level including the stack trace of the {@link Throwable} <code>t</code> passed as 2627 * parameter. 2628 * 2629 * @param level the logging level 2630 * @param message the message CharSequence to log. 2631 * @param t the exception to log, including its stack trace. 2632 */ 2633 void log(Level level, CharSequence message, Throwable t); 2634 2635 /** 2636 * Logs a message object with the given level. 2637 * 2638 * @param level the logging level 2639 * @param message the message object to log. 2640 */ 2641 void log(Level level, Object message); 2642 2643 /** 2644 * Logs a message at the given level including the stack trace of the {@link Throwable} <code>t</code> passed as 2645 * parameter. 2646 * 2647 * @param level the logging level 2648 * @param message the message to log. 2649 * @param t the exception to log, including its stack trace. 2650 */ 2651 void log(Level level, Object message, Throwable t); 2652 2653 /** 2654 * Logs a message object with the given level. 2655 * 2656 * @param level the logging level 2657 * @param message the message string to log. 2658 */ 2659 void log(Level level, String message); 2660 2661 /** 2662 * Logs a message with parameters at the given level. 2663 * 2664 * @param level the logging level 2665 * @param message the message to log; the format depends on the message factory. 2666 * @param params parameters to the message. 2667 * @see #getMessageFactory() 2668 */ 2669 void log(Level level, String message, Object... params); 2670 2671 /** 2672 * Logs a message with parameters which are only to be constructed if the logging level is the specified level. 2673 * 2674 * @param level the logging level 2675 * @param message the message to log; the format depends on the message factory. 2676 * @param paramSuppliers An array of functions, which when called, produce the desired log message parameters. 2677 * @since 2.4 2678 */ 2679 void log(Level level, String message, Supplier<?>... paramSuppliers); 2680 2681 /** 2682 * Logs a message at the given level including the stack trace of the {@link Throwable} <code>t</code> passed as 2683 * parameter. 2684 * 2685 * @param level the logging level 2686 * @param message the message to log. 2687 * @param t the exception to log, including its stack trace. 2688 */ 2689 void log(Level level, String message, Throwable t); 2690 2691 /** 2692 * Logs a message which is only to be constructed if the logging level is the specified level. 2693 * 2694 * @param level the logging level 2695 * @param msgSupplier A function, which when called, produces the desired log message; the format depends on the 2696 * message factory. 2697 * @since 2.4 2698 */ 2699 void log(Level level, Supplier<?> msgSupplier); 2700 2701 /** 2702 * Logs a message (only to be constructed if the logging level is the specified level) including the stack log of 2703 * the {@link Throwable} <code>t</code> passed as parameter. 2704 * 2705 * @param level the logging level 2706 * @param msgSupplier A function, which when called, produces the desired log message; the format depends on the 2707 * message factory. 2708 * @param t the exception to log, including its stack log. 2709 * @since 2.4 2710 */ 2711 void log(Level level, Supplier<?> msgSupplier, Throwable t); 2712 2713 /** 2714 * Logs a message with parameters at the specified level. 2715 * 2716 * @param level the logging level 2717 * @param marker the marker data specific to this log statement 2718 * @param message the message to log; the format depends on the message factory. 2719 * @param p0 parameter to the message. 2720 */ 2721 void log(Level level, Marker marker, String message, Object p0); 2722 2723 /** 2724 * Logs a message with parameters at the specified level. 2725 * 2726 * @param level the logging level 2727 * @param marker the marker data specific to this log statement 2728 * @param message the message to log; the format depends on the message factory. 2729 * @param p0 parameter to the message. 2730 * @param p1 parameter to the message. 2731 */ 2732 void log(Level level, Marker marker, String message, Object p0, Object p1); 2733 2734 /** 2735 * Logs a message with parameters at the specified level. 2736 * 2737 * @param level the logging level 2738 * @param marker the marker data specific to this log statement 2739 * @param message the message to log; the format depends on the message factory. 2740 * @param p0 parameter to the message. 2741 * @param p1 parameter to the message. 2742 * @param p2 parameter to the message. 2743 */ 2744 void log(Level level, Marker marker, String message, Object p0, Object p1, Object p2); 2745 2746 /** 2747 * Logs a message with parameters at the specified level. 2748 * 2749 * @param level the logging level 2750 * @param marker the marker data specific to this log statement 2751 * @param message the message to log; the format depends on the message factory. 2752 * @param p0 parameter to the message. 2753 * @param p1 parameter to the message. 2754 * @param p2 parameter to the message. 2755 * @param p3 parameter to the message. 2756 */ 2757 void log(Level level, Marker marker, String message, Object p0, Object p1, Object p2, Object p3); 2758 2759 /** 2760 * Logs a message with parameters at the specified level. 2761 * 2762 * @param level the logging level 2763 * @param marker the marker data specific to this log statement 2764 * @param message the message to log; the format depends on the message factory. 2765 * @param p0 parameter to the message. 2766 * @param p1 parameter to the message. 2767 * @param p2 parameter to the message. 2768 * @param p3 parameter to the message. 2769 * @param p4 parameter to the message. 2770 */ 2771 void log(Level level, Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4); 2772 2773 /** 2774 * Logs a message with parameters at the specified level. 2775 * 2776 * @param level the logging level 2777 * @param marker the marker data specific to this log statement 2778 * @param message the message to log; the format depends on the message factory. 2779 * @param p0 parameter to the message. 2780 * @param p1 parameter to the message. 2781 * @param p2 parameter to the message. 2782 * @param p3 parameter to the message. 2783 * @param p4 parameter to the message. 2784 * @param p5 parameter to the message. 2785 */ 2786 void log(Level level, Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5); 2787 2788 /** 2789 * Logs a message with parameters at the specified level. 2790 * 2791 * @param level the logging level 2792 * @param marker the marker data specific to this log statement 2793 * @param message the message to log; the format depends on the message factory. 2794 * @param p0 parameter to the message. 2795 * @param p1 parameter to the message. 2796 * @param p2 parameter to the message. 2797 * @param p3 parameter to the message. 2798 * @param p4 parameter to the message. 2799 * @param p5 parameter to the message. 2800 * @param p6 parameter to the message. 2801 */ 2802 void log(Level level, Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, 2803 Object p6); 2804 2805 /** 2806 * Logs a message with parameters at the specified level. 2807 * 2808 * @param level the logging level 2809 * @param marker the marker data specific to this log statement 2810 * @param message the message to log; the format depends on the message factory. 2811 * @param p0 parameter to the message. 2812 * @param p1 parameter to the message. 2813 * @param p2 parameter to the message. 2814 * @param p3 parameter to the message. 2815 * @param p4 parameter to the message. 2816 * @param p5 parameter to the message. 2817 * @param p6 parameter to the message. 2818 * @param p7 parameter to the message. 2819 */ 2820 void log(Level level, Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, 2821 Object p7); 2822 2823 /** 2824 * Logs a message with parameters at the specified level. 2825 * 2826 * @param level the logging level 2827 * @param marker the marker data specific to this log statement 2828 * @param message the message to log; the format depends on the message factory. 2829 * @param p0 parameter to the message. 2830 * @param p1 parameter to the message. 2831 * @param p2 parameter to the message. 2832 * @param p3 parameter to the message. 2833 * @param p4 parameter to the message. 2834 * @param p5 parameter to the message. 2835 * @param p6 parameter to the message. 2836 * @param p7 parameter to the message. 2837 * @param p8 parameter to the message. 2838 */ 2839 void log(Level level, Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, 2840 Object p7, Object p8); 2841 2842 /** 2843 * Logs a message with parameters at the specified level. 2844 * 2845 * @param level the logging level 2846 * @param marker the marker data specific to this log statement 2847 * @param message the message to log; the format depends on the message factory. 2848 * @param p0 parameter to the message. 2849 * @param p1 parameter to the message. 2850 * @param p2 parameter to the message. 2851 * @param p3 parameter to the message. 2852 * @param p4 parameter to the message. 2853 * @param p5 parameter to the message. 2854 * @param p6 parameter to the message. 2855 * @param p7 parameter to the message. 2856 * @param p8 parameter to the message. 2857 * @param p9 parameter to the message. 2858 */ 2859 void log(Level level, Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, 2860 Object p7, Object p8, Object p9); 2861 2862 /** 2863 * Logs a message with parameters at the specified level. 2864 * 2865 * @param level the logging level 2866 * @param message the message to log; the format depends on the message factory. 2867 * @param p0 parameter to the message. 2868 */ 2869 void log(Level level, String message, Object p0); 2870 2871 /** 2872 * Logs a message with parameters at the specified level. 2873 * 2874 * @param level the logging level 2875 * @param message the message to log; the format depends on the message factory. 2876 * @param p0 parameter to the message. 2877 * @param p1 parameter to the message. 2878 */ 2879 void log(Level level, String message, Object p0, Object p1); 2880 2881 /** 2882 * Logs a message with parameters at the specified level. 2883 * 2884 * @param level the logging level 2885 * @param message the message to log; the format depends on the message factory. 2886 * @param p0 parameter to the message. 2887 * @param p1 parameter to the message. 2888 * @param p2 parameter to the message. 2889 */ 2890 void log(Level level, String message, Object p0, Object p1, Object p2); 2891 2892 /** 2893 * Logs a message with parameters at the specified level. 2894 * 2895 * @param level the logging level 2896 * @param message the message to log; the format depends on the message factory. 2897 * @param p0 parameter to the message. 2898 * @param p1 parameter to the message. 2899 * @param p2 parameter to the message. 2900 * @param p3 parameter to the message. 2901 */ 2902 void log(Level level, String message, Object p0, Object p1, Object p2, Object p3); 2903 2904 /** 2905 * Logs a message with parameters at the specified level. 2906 * 2907 * @param level the logging level 2908 * @param message the message to log; the format depends on the message factory. 2909 * @param p0 parameter to the message. 2910 * @param p1 parameter to the message. 2911 * @param p2 parameter to the message. 2912 * @param p3 parameter to the message. 2913 * @param p4 parameter to the message. 2914 */ 2915 void log(Level level, String message, Object p0, Object p1, Object p2, Object p3, Object p4); 2916 2917 /** 2918 * Logs a message with parameters at the specified level. 2919 * 2920 * @param level the logging level 2921 * @param message the message to log; the format depends on the message factory. 2922 * @param p0 parameter to the message. 2923 * @param p1 parameter to the message. 2924 * @param p2 parameter to the message. 2925 * @param p3 parameter to the message. 2926 * @param p4 parameter to the message. 2927 * @param p5 parameter to the message. 2928 */ 2929 void log(Level level, String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5); 2930 2931 /** 2932 * Logs a message with parameters at the specified level. 2933 * 2934 * @param level the logging level 2935 * @param message the message to log; the format depends on the message factory. 2936 * @param p0 parameter to the message. 2937 * @param p1 parameter to the message. 2938 * @param p2 parameter to the message. 2939 * @param p3 parameter to the message. 2940 * @param p4 parameter to the message. 2941 * @param p5 parameter to the message. 2942 * @param p6 parameter to the message. 2943 */ 2944 void log(Level level, String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6); 2945 2946 /** 2947 * Logs a message with parameters at the specified level. 2948 * 2949 * @param level the logging level 2950 * @param message the message to log; the format depends on the message factory. 2951 * @param p0 parameter to the message. 2952 * @param p1 parameter to the message. 2953 * @param p2 parameter to the message. 2954 * @param p3 parameter to the message. 2955 * @param p4 parameter to the message. 2956 * @param p5 parameter to the message. 2957 * @param p6 parameter to the message. 2958 * @param p7 parameter to the message. 2959 */ 2960 void log(Level level, String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7); 2961 2962 /** 2963 * Logs a message with parameters at the specified level. 2964 * 2965 * @param level the logging level 2966 * @param message the message to log; the format depends on the message factory. 2967 * @param p0 parameter to the message. 2968 * @param p1 parameter to the message. 2969 * @param p2 parameter to the message. 2970 * @param p3 parameter to the message. 2971 * @param p4 parameter to the message. 2972 * @param p5 parameter to the message. 2973 * @param p6 parameter to the message. 2974 * @param p7 parameter to the message. 2975 * @param p8 parameter to the message. 2976 */ 2977 void log(Level level, String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7, 2978 Object p8); 2979 2980 /** 2981 * Logs a message with parameters at the specified level. 2982 * 2983 * @param level the logging level 2984 * @param message the message to log; the format depends on the message factory. 2985 * @param p0 parameter to the message. 2986 * @param p1 parameter to the message. 2987 * @param p2 parameter to the message. 2988 * @param p3 parameter to the message. 2989 * @param p4 parameter to the message. 2990 * @param p5 parameter to the message. 2991 * @param p6 parameter to the message. 2992 * @param p7 parameter to the message. 2993 * @param p8 parameter to the message. 2994 * @param p9 parameter to the message. 2995 */ 2996 void log(Level level, String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7, 2997 Object p8, Object p9); 2998 2999 /** 3000 * Logs a formatted message using the specified format string and arguments. 3001 * 3002 * @param level The logging Level. 3003 * @param marker the marker data specific to this log statement. 3004 * @param format The format String. 3005 * @param params Arguments specified by the format. 3006 */ 3007 void printf(Level level, Marker marker, String format, Object... params); 3008 3009 /** 3010 * Logs a formatted message using the specified format string and arguments. 3011 * 3012 * @param level The logging Level. 3013 * @param format The format String. 3014 * @param params Arguments specified by the format. 3015 */ 3016 void printf(Level level, String format, Object... params); 3017 3018 /** 3019 * Logs an exception or error to be thrown. This may be coded as: 3020 * 3021 * <pre> 3022 * throw logger.throwing(Level.DEBUG, myException); 3023 * </pre> 3024 * 3025 * @param <T> the Throwable type. 3026 * @param level The logging Level. 3027 * @param t The Throwable. 3028 * @return the Throwable. 3029 */ 3030 <T extends Throwable> T throwing(Level level, T t); 3031 3032 /** 3033 * Logs an exception or error to be thrown. This may be coded as: 3034 * 3035 * <pre> 3036 * throw logger.throwing(myException); 3037 * </pre> 3038 * 3039 * @param <T> the Throwable type. 3040 * @param t The Throwable. 3041 * @return the Throwable. 3042 */ 3043 <T extends Throwable> T throwing(T t); 3044 3045 /** 3046 * Logs a message with the specific Marker at the {@link Level#TRACE TRACE} level. 3047 * 3048 * @param marker the marker data specific to this log statement 3049 * @param msg the message string to be logged 3050 */ 3051 void trace(Marker marker, Message msg); 3052 3053 /** 3054 * Logs a message with the specific Marker at the {@link Level#TRACE TRACE} level. 3055 * 3056 * @param marker the marker data specific to this log statement 3057 * @param msg the message string to be logged 3058 * @param t A Throwable or null. 3059 */ 3060 void trace(Marker marker, Message msg, Throwable t); 3061 3062 /** 3063 * Logs a message which is only to be constructed if the logging level is the {@link Level#TRACE TRACE} level with 3064 * the specified Marker. The {@code MessageSupplier} may or may not use the {@link MessageFactory} to construct the 3065 * {@code Message}. 3066 * 3067 * @param marker the marker data specific to this log statement 3068 * @param msgSupplier A function, which when called, produces the desired log message. 3069 * @since 2.4 3070 * @deprecated Deprecated in 2.6, use the {@link Supplier} version of this API instead. 3071 */ 3072 @Deprecated 3073 void trace(Marker marker, MessageSupplier msgSupplier); 3074 3075 /** 3076 * Logs a message (only to be constructed if the logging level is the {@link Level#TRACE TRACE} level) with the 3077 * specified Marker and including the stack trace of the {@link Throwable} <code>t</code> passed as parameter. The 3078 * {@code MessageSupplier} may or may not use the {@link MessageFactory} to construct the {@code Message}. 3079 * 3080 * @param marker the marker data specific to this log statement 3081 * @param msgSupplier A function, which when called, produces the desired log message. 3082 * @param t A Throwable or null. 3083 * @since 2.4 3084 * @deprecated Deprecated in 2.6, use the {@link Supplier} version of this API instead. 3085 */ 3086 @Deprecated 3087 void trace(Marker marker, MessageSupplier msgSupplier, Throwable t); 3088 3089 /** 3090 * Logs a message CharSequence with the {@link Level#TRACE TRACE} level. 3091 * 3092 * @param marker the marker data specific to this log statement 3093 * @param message the message CharSequence to log. 3094 */ 3095 void trace(Marker marker, CharSequence message); 3096 3097 /** 3098 * Logs a CharSequence at the {@link Level#TRACE TRACE} level including the stack trace of the {@link Throwable} 3099 * <code>t</code> passed as parameter. 3100 * 3101 * @param marker the marker data specific to this log statement 3102 * @param message the message CharSequence to log. 3103 * @param t the exception to log, including its stack trace. 3104 * @see #debug(String) 3105 */ 3106 void trace(Marker marker, CharSequence message, Throwable t); 3107 3108 /** 3109 * Logs a message object with the {@link Level#TRACE TRACE} level. 3110 * 3111 * @param marker the marker data specific to this log statement 3112 * @param message the message object to log. 3113 */ 3114 void trace(Marker marker, Object message); 3115 3116 /** 3117 * Logs a message at the {@link Level#TRACE TRACE} level including the stack trace of the {@link Throwable} 3118 * <code>t</code> passed as parameter. 3119 * 3120 * @param marker the marker data specific to this log statement 3121 * @param message the message object to log. 3122 * @param t the exception to log, including its stack trace. 3123 * @see #debug(String) 3124 */ 3125 void trace(Marker marker, Object message, Throwable t); 3126 3127 /** 3128 * Logs a message object with the {@link Level#TRACE TRACE} level. 3129 * 3130 * @param marker the marker data specific to this log statement 3131 * @param message the message string to log. 3132 */ 3133 void trace(Marker marker, String message); 3134 3135 /** 3136 * Logs a message with parameters at the {@link Level#TRACE TRACE} level. 3137 * 3138 * @param marker the marker data specific to this log statement 3139 * @param message the message to log; the format depends on the message factory. 3140 * @param params parameters to the message. 3141 * @see #getMessageFactory() 3142 */ 3143 void trace(Marker marker, String message, Object... params); 3144 3145 /** 3146 * Logs a message with parameters which are only to be constructed if the logging level is the {@link Level#TRACE 3147 * TRACE} level. 3148 * 3149 * @param marker the marker data specific to this log statement 3150 * @param message the message to log; the format depends on the message factory. 3151 * @param paramSuppliers An array of functions, which when called, produce the desired log message parameters. 3152 * @since 2.4 3153 */ 3154 void trace(Marker marker, String message, Supplier<?>... paramSuppliers); 3155 3156 /** 3157 * Logs a message at the {@link Level#TRACE TRACE} level including the stack trace of the {@link Throwable} 3158 * <code>t</code> passed as parameter. 3159 * 3160 * @param marker the marker data specific to this log statement 3161 * @param message the message object to log. 3162 * @param t the exception to log, including its stack trace. 3163 * @see #debug(String) 3164 */ 3165 void trace(Marker marker, String message, Throwable t); 3166 3167 /** 3168 * Logs a message which is only to be constructed if the logging level is the {@link Level#TRACE TRACE} level with 3169 * the specified Marker. 3170 * 3171 * @param marker the marker data specific to this log statement 3172 * @param msgSupplier A function, which when called, produces the desired log message; the format depends on the 3173 * message factory. 3174 * @since 2.4 3175 */ 3176 void trace(Marker marker, Supplier<?> msgSupplier); 3177 3178 /** 3179 * Logs a message (only to be constructed if the logging level is the {@link Level#TRACE TRACE} level) with the 3180 * specified Marker and including the stack trace of the {@link Throwable} <code>t</code> passed as parameter. 3181 * 3182 * @param marker the marker data specific to this log statement 3183 * @param msgSupplier A function, which when called, produces the desired log message; the format depends on the 3184 * message factory. 3185 * @param t A Throwable or null. 3186 * @since 2.4 3187 */ 3188 void trace(Marker marker, Supplier<?> msgSupplier, Throwable t); 3189 3190 /** 3191 * Logs a message with the specific Marker at the {@link Level#TRACE TRACE} level. 3192 * 3193 * @param msg the message string to be logged 3194 */ 3195 void trace(Message msg); 3196 3197 /** 3198 * Logs a message with the specific Marker at the {@link Level#TRACE TRACE} level. 3199 * 3200 * @param msg the message string to be logged 3201 * @param t A Throwable or null. 3202 */ 3203 void trace(Message msg, Throwable t); 3204 3205 /** 3206 * Logs a message which is only to be constructed if the logging level is the {@link Level#TRACE TRACE} level. The 3207 * {@code MessageSupplier} may or may not use the {@link MessageFactory} to construct the {@code Message}. 3208 * 3209 * @param msgSupplier A function, which when called, produces the desired log message. 3210 * @since 2.4 3211 * @deprecated Deprecated in 2.6, use the {@link Supplier} version of this API instead. 3212 */ 3213 @Deprecated 3214 void trace(MessageSupplier msgSupplier); 3215 3216 /** 3217 * Logs a message (only to be constructed if the logging level is the {@link Level#TRACE TRACE} level) including the 3218 * stack trace of the {@link Throwable} <code>t</code> passed as parameter. The {@code MessageSupplier} may or may 3219 * not use the {@link MessageFactory} to construct the {@code Message}. 3220 * 3221 * @param msgSupplier A function, which when called, produces the desired log message. 3222 * @param t the exception to log, including its stack trace. 3223 * @since 2.4 3224 * @deprecated Deprecated in 2.6, use the {@link Supplier} version of this API instead. 3225 */ 3226 @Deprecated 3227 void trace(MessageSupplier msgSupplier, Throwable t); 3228 3229 /** 3230 * Logs a message CharSequence with the {@link Level#TRACE TRACE} level. 3231 * 3232 * @param message the message CharSequence to log. 3233 */ 3234 void trace(CharSequence message); 3235 3236 /** 3237 * Logs a CharSequence at the {@link Level#TRACE TRACE} level including the stack trace of the {@link Throwable} 3238 * <code>t</code> passed as parameter. 3239 * 3240 * @param message the message CharSequence to log. 3241 * @param t the exception to log, including its stack trace. 3242 * @see #debug(String) 3243 */ 3244 void trace(CharSequence message, Throwable t); 3245 3246 /** 3247 * Logs a message object with the {@link Level#TRACE TRACE} level. 3248 * 3249 * @param message the message object to log. 3250 */ 3251 void trace(Object message); 3252 3253 /** 3254 * Logs a message at the {@link Level#TRACE TRACE} level including the stack trace of the {@link Throwable} 3255 * <code>t</code> passed as parameter. 3256 * 3257 * @param message the message object to log. 3258 * @param t the exception to log, including its stack trace. 3259 * @see #debug(String) 3260 */ 3261 void trace(Object message, Throwable t); 3262 3263 /** 3264 * Logs a message object with the {@link Level#TRACE TRACE} level. 3265 * 3266 * @param message the message string to log. 3267 */ 3268 void trace(String message); 3269 3270 /** 3271 * Logs a message with parameters at the {@link Level#TRACE TRACE} level. 3272 * 3273 * @param message the message to log; the format depends on the message factory. 3274 * @param params parameters to the message. 3275 * @see #getMessageFactory() 3276 */ 3277 void trace(String message, Object... params); 3278 3279 /** 3280 * Logs a message with parameters which are only to be constructed if the logging level is the {@link Level#TRACE 3281 * TRACE} level. 3282 * 3283 * @param message the message to log; the format depends on the message factory. 3284 * @param paramSuppliers An array of functions, which when called, produce the desired log message parameters. 3285 * @since 2.4 3286 */ 3287 void trace(String message, Supplier<?>... paramSuppliers); 3288 3289 /** 3290 * Logs a message at the {@link Level#TRACE TRACE} level including the stack trace of the {@link Throwable} 3291 * <code>t</code> passed as parameter. 3292 * 3293 * @param message the message object to log. 3294 * @param t the exception to log, including its stack trace. 3295 * @see #debug(String) 3296 */ 3297 void trace(String message, Throwable t); 3298 3299 /** 3300 * Logs a message which is only to be constructed if the logging level is the {@link Level#TRACE TRACE} level. 3301 * 3302 * @param msgSupplier A function, which when called, produces the desired log message; the format depends on the 3303 * message factory. 3304 * @since 2.4 3305 */ 3306 void trace(Supplier<?> msgSupplier); 3307 3308 /** 3309 * Logs a message (only to be constructed if the logging level is the {@link Level#TRACE TRACE} level) including the 3310 * stack trace of the {@link Throwable} <code>t</code> passed as parameter. 3311 * 3312 * @param msgSupplier A function, which when called, produces the desired log message; the format depends on the 3313 * message factory. 3314 * @param t the exception to log, including its stack trace. 3315 * @since 2.4 3316 */ 3317 void trace(Supplier<?> msgSupplier, Throwable t); 3318 3319 /** 3320 * Logs a message with parameters at trace level. 3321 * 3322 * @param marker the marker data specific to this log statement 3323 * @param message the message to log; the format depends on the message factory. 3324 * @param p0 parameter to the message. 3325 */ 3326 void trace(Marker marker, String message, Object p0); 3327 3328 /** 3329 * Logs a message with parameters at trace level. 3330 * 3331 * @param marker the marker data specific to this log statement 3332 * @param message the message to log; the format depends on the message factory. 3333 * @param p0 parameter to the message. 3334 * @param p1 parameter to the message. 3335 */ 3336 void trace(Marker marker, String message, Object p0, Object p1); 3337 3338 /** 3339 * Logs a message with parameters at trace level. 3340 * 3341 * @param marker the marker data specific to this log statement 3342 * @param message the message to log; the format depends on the message factory. 3343 * @param p0 parameter to the message. 3344 * @param p1 parameter to the message. 3345 * @param p2 parameter to the message. 3346 */ 3347 void trace(Marker marker, String message, Object p0, Object p1, Object p2); 3348 3349 /** 3350 * Logs a message with parameters at trace level. 3351 * 3352 * @param marker the marker data specific to this log statement 3353 * @param message the message to log; the format depends on the message factory. 3354 * @param p0 parameter to the message. 3355 * @param p1 parameter to the message. 3356 * @param p2 parameter to the message. 3357 * @param p3 parameter to the message. 3358 */ 3359 void trace(Marker marker, String message, Object p0, Object p1, Object p2, Object p3); 3360 3361 /** 3362 * Logs a message with parameters at trace level. 3363 * 3364 * @param marker the marker data specific to this log statement 3365 * @param message the message to log; the format depends on the message factory. 3366 * @param p0 parameter to the message. 3367 * @param p1 parameter to the message. 3368 * @param p2 parameter to the message. 3369 * @param p3 parameter to the message. 3370 * @param p4 parameter to the message. 3371 */ 3372 void trace(Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4); 3373 3374 /** 3375 * Logs a message with parameters at trace level. 3376 * 3377 * @param marker the marker data specific to this log statement 3378 * @param message the message to log; the format depends on the message factory. 3379 * @param p0 parameter to the message. 3380 * @param p1 parameter to the message. 3381 * @param p2 parameter to the message. 3382 * @param p3 parameter to the message. 3383 * @param p4 parameter to the message. 3384 * @param p5 parameter to the message. 3385 */ 3386 void trace(Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5); 3387 3388 /** 3389 * Logs a message with parameters at trace level. 3390 * 3391 * @param marker the marker data specific to this log statement 3392 * @param message the message to log; the format depends on the message factory. 3393 * @param p0 parameter to the message. 3394 * @param p1 parameter to the message. 3395 * @param p2 parameter to the message. 3396 * @param p3 parameter to the message. 3397 * @param p4 parameter to the message. 3398 * @param p5 parameter to the message. 3399 * @param p6 parameter to the message. 3400 */ 3401 void trace(Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, 3402 Object p6); 3403 3404 /** 3405 * Logs a message with parameters at trace level. 3406 * 3407 * @param marker the marker data specific to this log statement 3408 * @param message the message to log; the format depends on the message factory. 3409 * @param p0 parameter to the message. 3410 * @param p1 parameter to the message. 3411 * @param p2 parameter to the message. 3412 * @param p3 parameter to the message. 3413 * @param p4 parameter to the message. 3414 * @param p5 parameter to the message. 3415 * @param p6 parameter to the message. 3416 * @param p7 parameter to the message. 3417 */ 3418 void trace(Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, 3419 Object p7); 3420 3421 /** 3422 * Logs a message with parameters at trace level. 3423 * 3424 * @param marker the marker data specific to this log statement 3425 * @param message the message to log; the format depends on the message factory. 3426 * @param p0 parameter to the message. 3427 * @param p1 parameter to the message. 3428 * @param p2 parameter to the message. 3429 * @param p3 parameter to the message. 3430 * @param p4 parameter to the message. 3431 * @param p5 parameter to the message. 3432 * @param p6 parameter to the message. 3433 * @param p7 parameter to the message. 3434 * @param p8 parameter to the message. 3435 */ 3436 void trace(Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, 3437 Object p7, Object p8); 3438 3439 /** 3440 * Logs a message with parameters at trace level. 3441 * 3442 * @param marker the marker data specific to this log statement 3443 * @param message the message to log; the format depends on the message factory. 3444 * @param p0 parameter to the message. 3445 * @param p1 parameter to the message. 3446 * @param p2 parameter to the message. 3447 * @param p3 parameter to the message. 3448 * @param p4 parameter to the message. 3449 * @param p5 parameter to the message. 3450 * @param p6 parameter to the message. 3451 * @param p7 parameter to the message. 3452 * @param p8 parameter to the message. 3453 * @param p9 parameter to the message. 3454 */ 3455 void trace(Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, 3456 Object p7, Object p8, Object p9); 3457 3458 /** 3459 * Logs a message with parameters at trace level. 3460 * 3461 * @param message the message to log; the format depends on the message factory. 3462 * @param p0 parameter to the message. 3463 */ 3464 void trace(String message, Object p0); 3465 3466 /** 3467 * Logs a message with parameters at trace level. 3468 * 3469 * @param message the message to log; the format depends on the message factory. 3470 * @param p0 parameter to the message. 3471 * @param p1 parameter to the message. 3472 */ 3473 void trace(String message, Object p0, Object p1); 3474 3475 /** 3476 * Logs a message with parameters at trace level. 3477 * 3478 * @param message the message to log; the format depends on the message factory. 3479 * @param p0 parameter to the message. 3480 * @param p1 parameter to the message. 3481 * @param p2 parameter to the message. 3482 */ 3483 void trace(String message, Object p0, Object p1, Object p2); 3484 3485 /** 3486 * Logs a message with parameters at trace level. 3487 * 3488 * @param message the message to log; the format depends on the message factory. 3489 * @param p0 parameter to the message. 3490 * @param p1 parameter to the message. 3491 * @param p2 parameter to the message. 3492 * @param p3 parameter to the message. 3493 */ 3494 void trace(String message, Object p0, Object p1, Object p2, Object p3); 3495 3496 /** 3497 * Logs a message with parameters at trace level. 3498 * 3499 * @param message the message to log; the format depends on the message factory. 3500 * @param p0 parameter to the message. 3501 * @param p1 parameter to the message. 3502 * @param p2 parameter to the message. 3503 * @param p3 parameter to the message. 3504 * @param p4 parameter to the message. 3505 */ 3506 void trace(String message, Object p0, Object p1, Object p2, Object p3, Object p4); 3507 3508 /** 3509 * Logs a message with parameters at trace level. 3510 * 3511 * @param message the message to log; the format depends on the message factory. 3512 * @param p0 parameter to the message. 3513 * @param p1 parameter to the message. 3514 * @param p2 parameter to the message. 3515 * @param p3 parameter to the message. 3516 * @param p4 parameter to the message. 3517 * @param p5 parameter to the message. 3518 */ 3519 void trace(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5); 3520 3521 /** 3522 * Logs a message with parameters at trace level. 3523 * 3524 * @param message the message to log; the format depends on the message factory. 3525 * @param p0 parameter to the message. 3526 * @param p1 parameter to the message. 3527 * @param p2 parameter to the message. 3528 * @param p3 parameter to the message. 3529 * @param p4 parameter to the message. 3530 * @param p5 parameter to the message. 3531 * @param p6 parameter to the message. 3532 */ 3533 void trace(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6); 3534 3535 /** 3536 * Logs a message with parameters at trace level. 3537 * 3538 * @param message the message to log; the format depends on the message factory. 3539 * @param p0 parameter to the message. 3540 * @param p1 parameter to the message. 3541 * @param p2 parameter to the message. 3542 * @param p3 parameter to the message. 3543 * @param p4 parameter to the message. 3544 * @param p5 parameter to the message. 3545 * @param p6 parameter to the message. 3546 * @param p7 parameter to the message. 3547 */ 3548 void trace(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7); 3549 3550 /** 3551 * Logs a message with parameters at trace level. 3552 * 3553 * @param message the message to log; the format depends on the message factory. 3554 * @param p0 parameter to the message. 3555 * @param p1 parameter to the message. 3556 * @param p2 parameter to the message. 3557 * @param p3 parameter to the message. 3558 * @param p4 parameter to the message. 3559 * @param p5 parameter to the message. 3560 * @param p6 parameter to the message. 3561 * @param p7 parameter to the message. 3562 * @param p8 parameter to the message. 3563 */ 3564 void trace(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7, 3565 Object p8); 3566 3567 /** 3568 * Logs a message with parameters at trace level. 3569 * 3570 * @param message the message to log; the format depends on the message factory. 3571 * @param p0 parameter to the message. 3572 * @param p1 parameter to the message. 3573 * @param p2 parameter to the message. 3574 * @param p3 parameter to the message. 3575 * @param p4 parameter to the message. 3576 * @param p5 parameter to the message. 3577 * @param p6 parameter to the message. 3578 * @param p7 parameter to the message. 3579 * @param p8 parameter to the message. 3580 * @param p9 parameter to the message. 3581 */ 3582 void trace(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7, 3583 Object p8, Object p9); 3584 3585 /** 3586 * Logs entry to a method. Used when the method in question has no parameters or when the parameters should not be 3587 * logged. 3588 * 3589 * @return built message 3590 * @since 2.6 3591 */ 3592 EntryMessage traceEntry(); 3593 3594 /** 3595 * Logs entry to a method along with its parameters. For example, 3596 * 3597 * <pre> 3598 * public void doSomething(String foo, int bar) { 3599 * LOGGER.traceEntry("Parameters: {} and {}", foo, bar); 3600 * // do something 3601 * } 3602 * </pre> 3603 * or: 3604 * <pre> 3605 * public int doSomething(String foo, int bar) { 3606 * Message m = LOGGER.traceEntry("doSomething(foo={}, bar={})", foo, bar); 3607 * // do something 3608 * return traceExit(m, value); 3609 * } 3610 * </pre> 3611 * 3612 * @param format The format String for the parameters. 3613 * @param params The parameters to the method. 3614 * @return The built Message 3615 * 3616 * @since 2.6 3617 */ 3618 EntryMessage traceEntry(String format, Object... params); 3619 3620 /** 3621 * Logs entry to a method along with its parameters. For example, 3622 * 3623 * <pre> 3624 * public void doSomething(Request foo) { 3625 * LOGGER.traceEntry(()->gson.toJson(foo)); 3626 * // do something 3627 * } 3628 * </pre> 3629 * 3630 * @param paramSuppliers The Suppliers for the parameters to the method. 3631 * @return built message 3632 * 3633 * @since 2.6 3634 */ 3635 EntryMessage traceEntry(Supplier<?>... paramSuppliers); 3636 3637 /** 3638 * Logs entry to a method along with its parameters. For example, 3639 * 3640 * <pre> 3641 * public void doSomething(String foo, int bar) { 3642 * LOGGER.traceEntry("Parameters: {} and {}", ()->gson.toJson(foo), ()-> bar); 3643 * // do something 3644 * } 3645 * </pre> 3646 * 3647 * @param format The format String for the parameters. 3648 * @param paramSuppliers The Suppliers for the parameters to the method. 3649 * @return built message 3650 * 3651 * @since 2.6 3652 */ 3653 EntryMessage traceEntry(String format, Supplier<?>... paramSuppliers); 3654 3655 /** 3656 * Logs entry to a method using a Message to describe the parameters. 3657 * <pre> 3658 * public void doSomething(Request foo) { 3659 * LOGGER.traceEntry(new JsonMessage(foo)); 3660 * // do something 3661 * } 3662 * </pre> 3663 * <p> 3664 * Avoid passing a {@code ReusableMessage} to this method (therefore, also avoid passing messages created by 3665 * calling {@code logger.getMessageFactory().newMessage("some message")}): Log4j will replace such messages with 3666 * an immutable message to prevent situations where the reused message instance is modified by subsequent calls to 3667 * the logger before the returned {@code EntryMessage} is fully processed. 3668 * </p> 3669 * 3670 * @param message The message. Avoid specifying a ReusableMessage, use immutable messages instead. 3671 * @return the built message 3672 * 3673 * @since 2.6 3674 * @see org.apache.logging.log4j.message.ReusableMessage 3675 */ 3676 EntryMessage traceEntry(Message message); 3677 3678 /** 3679 * Logs exit from a method. Used for methods that do not return anything. 3680 * 3681 * @since 2.6 3682 */ 3683 void traceExit(); 3684 3685 /** 3686 * Logs exiting from a method with the result. This may be coded as: 3687 * 3688 * <pre> 3689 * return LOGGER.traceExit(myResult); 3690 * </pre> 3691 * 3692 * @param <R> The type of the parameter and object being returned. 3693 * @param result The result being returned from the method call. 3694 * @return the result. 3695 * 3696 * @since 2.6 3697 */ 3698 <R> R traceExit(R result); 3699 3700 /** 3701 * Logs exiting from a method with the result. This may be coded as: 3702 * 3703 * <pre> 3704 * return LOGGER.traceExit("Result: {}", myResult); 3705 * </pre> 3706 * 3707 * @param <R> The type of the parameter and object being returned. 3708 * @param format The format String for the result. 3709 * @param result The result being returned from the method call. 3710 * @return the result. 3711 * 3712 * @since 2.6 3713 */ 3714 <R> R traceExit(String format, R result); 3715 3716 /** 3717 * Logs exiting from a method with no result. Allows custom formatting of the result. This may be coded as: 3718 * 3719 * <pre> 3720 * public long doSomething(int a, int b) { 3721 * EntryMessage m = traceEntry("doSomething(a={}, b={})", a, b); 3722 * // ... 3723 * return LOGGER.traceExit(m); 3724 * } 3725 * </pre> 3726 * @param message The Message containing the formatted result. 3727 * 3728 * @since 2.6 3729 */ 3730 void traceExit(EntryMessage message); 3731 3732 /** 3733 * Logs exiting from a method with the result. Allows custom formatting of the result. This may be coded as: 3734 * 3735 * <pre> 3736 * public long doSomething(int a, int b) { 3737 * EntryMessage m = traceEntry("doSomething(a={}, b={})", a, b); 3738 * // ... 3739 * return LOGGER.traceExit(m, myResult); 3740 * } 3741 * </pre> 3742 * @param message The Message containing the formatted result. 3743 * @param result The result being returned from the method call. 3744 * 3745 * @param <R> The type of the parameter and object being returned. 3746 * @return the result. 3747 * 3748 * @since 2.6 3749 */ 3750 <R> R traceExit(EntryMessage message, R result); 3751 3752 /** 3753 * Logs exiting from a method with the result. Allows custom formatting of the result. This may be coded as: 3754 * 3755 * <pre> 3756 * return LOGGER.traceExit(new JsonMessage(myResult), myResult); 3757 * </pre> 3758 * @param message The Message containing the formatted result. 3759 * @param result The result being returned from the method call. 3760 * 3761 * @param <R> The type of the parameter and object being returned. 3762 * @return the result. 3763 * 3764 * @since 2.6 3765 */ 3766 <R> R traceExit(Message message, R result); 3767 3768 /** 3769 * Logs a message with the specific Marker at the {@link Level#WARN WARN} level. 3770 * 3771 * @param marker the marker data specific to this log statement 3772 * @param msg the message string to be logged 3773 */ 3774 void warn(Marker marker, Message msg); 3775 3776 /** 3777 * Logs a message with the specific Marker at the {@link Level#WARN WARN} level. 3778 * 3779 * @param marker the marker data specific to this log statement 3780 * @param msg the message string to be logged 3781 * @param t A Throwable or null. 3782 */ 3783 void warn(Marker marker, Message msg, Throwable t); 3784 3785 /** 3786 * Logs a message which is only to be constructed if the logging level is the {@link Level#WARN WARN} level with the 3787 * specified Marker. The {@code MessageSupplier} may or may not use the {@link MessageFactory} to construct the 3788 * {@code Message}. 3789 * 3790 * @param marker the marker data specific to this log statement 3791 * @param msgSupplier A function, which when called, produces the desired log message. 3792 * @since 2.4 3793 * @deprecated Deprecated in 2.6, use the {@link Supplier} version of this API instead. 3794 */ 3795 @Deprecated 3796 void warn(Marker marker, MessageSupplier msgSupplier); 3797 3798 /** 3799 * Logs a message (only to be constructed if the logging level is the {@link Level#WARN WARN} level) with the 3800 * specified Marker and including the stack warn of the {@link Throwable} <code>t</code> passed as parameter. The 3801 * {@code MessageSupplier} may or may not use the {@link MessageFactory} to construct the {@code Message}. 3802 * 3803 * @param marker the marker data specific to this log statement 3804 * @param msgSupplier A function, which when called, produces the desired log message. 3805 * @param t A Throwable or null. 3806 * @since 2.4 3807 * @deprecated Deprecated in 2.6, use the {@link Supplier} version of this API instead. 3808 */ 3809 @Deprecated 3810 void warn(Marker marker, MessageSupplier msgSupplier, Throwable t); 3811 3812 /** 3813 * Logs a message CharSequence with the {@link Level#WARN WARN} level. 3814 * 3815 * @param marker the marker data specific to this log statement 3816 * @param message the message CharSequence to log. 3817 */ 3818 void warn(Marker marker, CharSequence message); 3819 3820 /** 3821 * Logs a CharSequence at the {@link Level#WARN WARN} level including the stack trace of the {@link Throwable} 3822 * <code>t</code> passed as parameter. 3823 * 3824 * @param marker the marker data specific to this log statement 3825 * @param message the message CharSequence to log. 3826 * @param t the exception to log, including its stack trace. 3827 */ 3828 void warn(Marker marker, CharSequence message, Throwable t); 3829 3830 /** 3831 * Logs a message object with the {@link Level#WARN WARN} level. 3832 * 3833 * @param marker the marker data specific to this log statement 3834 * @param message the message object to log. 3835 */ 3836 void warn(Marker marker, Object message); 3837 3838 /** 3839 * Logs a message at the {@link Level#WARN WARN} level including the stack trace of the {@link Throwable} 3840 * <code>t</code> passed as parameter. 3841 * 3842 * @param marker the marker data specific to this log statement 3843 * @param message the message object to log. 3844 * @param t the exception to log, including its stack trace. 3845 */ 3846 void warn(Marker marker, Object message, Throwable t); 3847 3848 /** 3849 * Logs a message object with the {@link Level#WARN WARN} level. 3850 * 3851 * @param marker the marker data specific to this log statement 3852 * @param message the message object to log. 3853 */ 3854 void warn(Marker marker, String message); 3855 3856 /** 3857 * Logs a message with parameters at the {@link Level#WARN WARN} level. 3858 * 3859 * @param marker the marker data specific to this log statement. 3860 * @param message the message to log; the format depends on the message factory. 3861 * @param params parameters to the message. 3862 * @see #getMessageFactory() 3863 */ 3864 void warn(Marker marker, String message, Object... params); 3865 3866 /** 3867 * Logs a message with parameters which are only to be constructed if the logging level is the {@link Level#WARN 3868 * WARN} level. 3869 * 3870 * @param marker the marker data specific to this log statement 3871 * @param message the message to log; the format depends on the message factory. 3872 * @param paramSuppliers An array of functions, which when called, produce the desired log message parameters. 3873 * @since 2.4 3874 */ 3875 void warn(Marker marker, String message, Supplier<?>... paramSuppliers); 3876 3877 /** 3878 * Logs a message at the {@link Level#WARN WARN} level including the stack trace of the {@link Throwable} 3879 * <code>t</code> passed as parameter. 3880 * 3881 * @param marker the marker data specific to this log statement 3882 * @param message the message object to log. 3883 * @param t the exception to log, including its stack trace. 3884 */ 3885 void warn(Marker marker, String message, Throwable t); 3886 3887 /** 3888 * Logs a message which is only to be constructed if the logging level is the {@link Level#WARN WARN} level with the 3889 * specified Marker. 3890 * 3891 * @param marker the marker data specific to this log statement 3892 * @param msgSupplier A function, which when called, produces the desired log message; the format depends on the 3893 * message factory. 3894 * @since 2.4 3895 */ 3896 void warn(Marker marker, Supplier<?> msgSupplier); 3897 3898 /** 3899 * Logs a message (only to be constructed if the logging level is the {@link Level#WARN WARN} level) with the 3900 * specified Marker and including the stack warn of the {@link Throwable} <code>t</code> passed as parameter. 3901 * 3902 * @param marker the marker data specific to this log statement 3903 * @param msgSupplier A function, which when called, produces the desired log message; the format depends on the 3904 * message factory. 3905 * @param t A Throwable or null. 3906 * @since 2.4 3907 */ 3908 void warn(Marker marker, Supplier<?> msgSupplier, Throwable t); 3909 3910 /** 3911 * Logs a message with the specific Marker at the {@link Level#WARN WARN} level. 3912 * 3913 * @param msg the message string to be logged 3914 */ 3915 void warn(Message msg); 3916 3917 /** 3918 * Logs a message with the specific Marker at the {@link Level#WARN WARN} level. 3919 * 3920 * @param msg the message string to be logged 3921 * @param t A Throwable or null. 3922 */ 3923 void warn(Message msg, Throwable t); 3924 3925 /** 3926 * Logs a message which is only to be constructed if the logging level is the {@link Level#WARN WARN} level. The 3927 * {@code MessageSupplier} may or may not use the {@link MessageFactory} to construct the {@code Message}. 3928 * 3929 * @param msgSupplier A function, which when called, produces the desired log message. 3930 * @since 2.4 3931 * @deprecated Deprecated in 2.6, use the {@link Supplier} version of this API instead. 3932 */ 3933 @Deprecated 3934 void warn(MessageSupplier msgSupplier); 3935 3936 /** 3937 * Logs a message (only to be constructed if the logging level is the {@link Level#WARN WARN} level) including the 3938 * stack warn of the {@link Throwable} <code>t</code> passed as parameter. The {@code MessageSupplier} may or may 3939 * not use the {@link MessageFactory} to construct the {@code Message}. 3940 * 3941 * @param msgSupplier A function, which when called, produces the desired log message. 3942 * @param t the exception to log, including its stack warn. 3943 * @since 2.4 3944 * @deprecated Deprecated in 2.6, use the {@link Supplier} version of this API instead. 3945 */ 3946 @Deprecated 3947 void warn(MessageSupplier msgSupplier, Throwable t); 3948 3949 /** 3950 * Logs a message CharSequence with the {@link Level#WARN WARN} level. 3951 * 3952 * @param message the message CharSequence to log. 3953 */ 3954 void warn(CharSequence message); 3955 3956 /** 3957 * Logs a CharSequence at the {@link Level#WARN WARN} level including the stack trace of the {@link Throwable} 3958 * <code>t</code> passed as parameter. 3959 * 3960 * @param message the message CharSequence to log. 3961 * @param t the exception to log, including its stack trace. 3962 */ 3963 void warn(CharSequence message, Throwable t); 3964 3965 /** 3966 * Logs a message object with the {@link Level#WARN WARN} level. 3967 * 3968 * @param message the message object to log. 3969 */ 3970 void warn(Object message); 3971 3972 /** 3973 * Logs a message at the {@link Level#WARN WARN} level including the stack trace of the {@link Throwable} 3974 * <code>t</code> passed as parameter. 3975 * 3976 * @param message the message object to log. 3977 * @param t the exception to log, including its stack trace. 3978 */ 3979 void warn(Object message, Throwable t); 3980 3981 /** 3982 * Logs a message object with the {@link Level#WARN WARN} level. 3983 * 3984 * @param message the message string to log. 3985 */ 3986 void warn(String message); 3987 3988 /** 3989 * Logs a message with parameters at the {@link Level#WARN WARN} level. 3990 * 3991 * @param message the message to log; the format depends on the message factory. 3992 * @param params parameters to the message. 3993 * @see #getMessageFactory() 3994 */ 3995 void warn(String message, Object... params); 3996 3997 /** 3998 * Logs a message with parameters which are only to be constructed if the logging level is the {@link Level#WARN 3999 * WARN} level. 4000 * 4001 * @param message the message to log; the format depends on the message factory. 4002 * @param paramSuppliers An array of functions, which when called, produce the desired log message parameters. 4003 * @since 2.4 4004 */ 4005 void warn(String message, Supplier<?>... paramSuppliers); 4006 4007 /** 4008 * Logs a message at the {@link Level#WARN WARN} level including the stack trace of the {@link Throwable} 4009 * <code>t</code> passed as parameter. 4010 * 4011 * @param message the message object to log. 4012 * @param t the exception to log, including its stack trace. 4013 */ 4014 void warn(String message, Throwable t); 4015 4016 /** 4017 * Logs a message which is only to be constructed if the logging level is the {@link Level#WARN WARN} level. 4018 * 4019 * @param msgSupplier A function, which when called, produces the desired log message; the format depends on the 4020 * message factory. 4021 * @since 2.4 4022 */ 4023 void warn(Supplier<?> msgSupplier); 4024 4025 /** 4026 * Logs a message (only to be constructed if the logging level is the {@link Level#WARN WARN} level) including the 4027 * stack warn of the {@link Throwable} <code>t</code> passed as parameter. 4028 * 4029 * @param msgSupplier A function, which when called, produces the desired log message; the format depends on the 4030 * message factory. 4031 * @param t the exception to log, including its stack warn. 4032 * @since 2.4 4033 */ 4034 void warn(Supplier<?> msgSupplier, Throwable t); 4035 4036 /** 4037 * Logs a message with parameters at warn level. 4038 * 4039 * @param marker the marker data specific to this log statement 4040 * @param message the message to log; the format depends on the message factory. 4041 * @param p0 parameter to the message. 4042 */ 4043 void warn(Marker marker, String message, Object p0); 4044 4045 /** 4046 * Logs a message with parameters at warn level. 4047 * 4048 * @param marker the marker data specific to this log statement 4049 * @param message the message to log; the format depends on the message factory. 4050 * @param p0 parameter to the message. 4051 * @param p1 parameter to the message. 4052 */ 4053 void warn(Marker marker, String message, Object p0, Object p1); 4054 4055 /** 4056 * Logs a message with parameters at warn level. 4057 * 4058 * @param marker the marker data specific to this log statement 4059 * @param message the message to log; the format depends on the message factory. 4060 * @param p0 parameter to the message. 4061 * @param p1 parameter to the message. 4062 * @param p2 parameter to the message. 4063 */ 4064 void warn(Marker marker, String message, Object p0, Object p1, Object p2); 4065 4066 /** 4067 * Logs a message with parameters at warn level. 4068 * 4069 * @param marker the marker data specific to this log statement 4070 * @param message the message to log; the format depends on the message factory. 4071 * @param p0 parameter to the message. 4072 * @param p1 parameter to the message. 4073 * @param p2 parameter to the message. 4074 * @param p3 parameter to the message. 4075 */ 4076 void warn(Marker marker, String message, Object p0, Object p1, Object p2, Object p3); 4077 4078 /** 4079 * Logs a message with parameters at warn level. 4080 * 4081 * @param marker the marker data specific to this log statement 4082 * @param message the message to log; the format depends on the message factory. 4083 * @param p0 parameter to the message. 4084 * @param p1 parameter to the message. 4085 * @param p2 parameter to the message. 4086 * @param p3 parameter to the message. 4087 * @param p4 parameter to the message. 4088 */ 4089 void warn(Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4); 4090 4091 /** 4092 * Logs a message with parameters at warn level. 4093 * 4094 * @param marker the marker data specific to this log statement 4095 * @param message the message to log; the format depends on the message factory. 4096 * @param p0 parameter to the message. 4097 * @param p1 parameter to the message. 4098 * @param p2 parameter to the message. 4099 * @param p3 parameter to the message. 4100 * @param p4 parameter to the message. 4101 * @param p5 parameter to the message. 4102 */ 4103 void warn(Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5); 4104 4105 /** 4106 * Logs a message with parameters at warn level. 4107 * 4108 * @param marker the marker data specific to this log statement 4109 * @param message the message to log; the format depends on the message factory. 4110 * @param p0 parameter to the message. 4111 * @param p1 parameter to the message. 4112 * @param p2 parameter to the message. 4113 * @param p3 parameter to the message. 4114 * @param p4 parameter to the message. 4115 * @param p5 parameter to the message. 4116 * @param p6 parameter to the message. 4117 */ 4118 void warn(Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, 4119 Object p6); 4120 4121 /** 4122 * Logs a message with parameters at warn level. 4123 * 4124 * @param marker the marker data specific to this log statement 4125 * @param message the message to log; the format depends on the message factory. 4126 * @param p0 parameter to the message. 4127 * @param p1 parameter to the message. 4128 * @param p2 parameter to the message. 4129 * @param p3 parameter to the message. 4130 * @param p4 parameter to the message. 4131 * @param p5 parameter to the message. 4132 * @param p6 parameter to the message. 4133 * @param p7 parameter to the message. 4134 */ 4135 void warn(Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, 4136 Object p7); 4137 4138 /** 4139 * Logs a message with parameters at warn level. 4140 * 4141 * @param marker the marker data specific to this log statement 4142 * @param message the message to log; the format depends on the message factory. 4143 * @param p0 parameter to the message. 4144 * @param p1 parameter to the message. 4145 * @param p2 parameter to the message. 4146 * @param p3 parameter to the message. 4147 * @param p4 parameter to the message. 4148 * @param p5 parameter to the message. 4149 * @param p6 parameter to the message. 4150 * @param p7 parameter to the message. 4151 * @param p8 parameter to the message. 4152 */ 4153 void warn(Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, 4154 Object p7, Object p8); 4155 4156 /** 4157 * Logs a message with parameters at warn level. 4158 * 4159 * @param marker the marker data specific to this log statement 4160 * @param message the message to log; the format depends on the message factory. 4161 * @param p0 parameter to the message. 4162 * @param p1 parameter to the message. 4163 * @param p2 parameter to the message. 4164 * @param p3 parameter to the message. 4165 * @param p4 parameter to the message. 4166 * @param p5 parameter to the message. 4167 * @param p6 parameter to the message. 4168 * @param p7 parameter to the message. 4169 * @param p8 parameter to the message. 4170 * @param p9 parameter to the message. 4171 */ 4172 void warn(Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, 4173 Object p7, Object p8, Object p9); 4174 4175 /** 4176 * Logs a message with parameters at warn level. 4177 * 4178 * @param message the message to log; the format depends on the message factory. 4179 * @param p0 parameter to the message. 4180 */ 4181 void warn(String message, Object p0); 4182 4183 /** 4184 * Logs a message with parameters at warn level. 4185 * 4186 * @param message the message to log; the format depends on the message factory. 4187 * @param p0 parameter to the message. 4188 * @param p1 parameter to the message. 4189 */ 4190 void warn(String message, Object p0, Object p1); 4191 4192 /** 4193 * Logs a message with parameters at warn level. 4194 * 4195 * @param message the message to log; the format depends on the message factory. 4196 * @param p0 parameter to the message. 4197 * @param p1 parameter to the message. 4198 * @param p2 parameter to the message. 4199 */ 4200 void warn(String message, Object p0, Object p1, Object p2); 4201 4202 /** 4203 * Logs a message with parameters at warn level. 4204 * 4205 * @param message the message to log; the format depends on the message factory. 4206 * @param p0 parameter to the message. 4207 * @param p1 parameter to the message. 4208 * @param p2 parameter to the message. 4209 * @param p3 parameter to the message. 4210 */ 4211 void warn(String message, Object p0, Object p1, Object p2, Object p3); 4212 4213 /** 4214 * Logs a message with parameters at warn level. 4215 * 4216 * @param message the message to log; the format depends on the message factory. 4217 * @param p0 parameter to the message. 4218 * @param p1 parameter to the message. 4219 * @param p2 parameter to the message. 4220 * @param p3 parameter to the message. 4221 * @param p4 parameter to the message. 4222 */ 4223 void warn(String message, Object p0, Object p1, Object p2, Object p3, Object p4); 4224 4225 /** 4226 * Logs a message with parameters at warn level. 4227 * 4228 * @param message the message to log; the format depends on the message factory. 4229 * @param p0 parameter to the message. 4230 * @param p1 parameter to the message. 4231 * @param p2 parameter to the message. 4232 * @param p3 parameter to the message. 4233 * @param p4 parameter to the message. 4234 * @param p5 parameter to the message. 4235 */ 4236 void warn(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5); 4237 4238 /** 4239 * Logs a message with parameters at warn level. 4240 * 4241 * @param message the message to log; the format depends on the message factory. 4242 * @param p0 parameter to the message. 4243 * @param p1 parameter to the message. 4244 * @param p2 parameter to the message. 4245 * @param p3 parameter to the message. 4246 * @param p4 parameter to the message. 4247 * @param p5 parameter to the message. 4248 * @param p6 parameter to the message. 4249 */ 4250 void warn(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6); 4251 4252 /** 4253 * Logs a message with parameters at warn level. 4254 * 4255 * @param message the message to log; the format depends on the message factory. 4256 * @param p0 parameter to the message. 4257 * @param p1 parameter to the message. 4258 * @param p2 parameter to the message. 4259 * @param p3 parameter to the message. 4260 * @param p4 parameter to the message. 4261 * @param p5 parameter to the message. 4262 * @param p6 parameter to the message. 4263 * @param p7 parameter to the message. 4264 */ 4265 void warn(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7); 4266 4267 /** 4268 * Logs a message with parameters at warn level. 4269 * 4270 * @param message the message to log; the format depends on the message factory. 4271 * @param p0 parameter to the message. 4272 * @param p1 parameter to the message. 4273 * @param p2 parameter to the message. 4274 * @param p3 parameter to the message. 4275 * @param p4 parameter to the message. 4276 * @param p5 parameter to the message. 4277 * @param p6 parameter to the message. 4278 * @param p7 parameter to the message. 4279 * @param p8 parameter to the message. 4280 */ 4281 void warn(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7, 4282 Object p8); 4283 4284 /** 4285 * Logs a message with parameters at warn level. 4286 * 4287 * @param message the message to log; the format depends on the message factory. 4288 * @param p0 parameter to the message. 4289 * @param p1 parameter to the message. 4290 * @param p2 parameter to the message. 4291 * @param p3 parameter to the message. 4292 * @param p4 parameter to the message. 4293 * @param p5 parameter to the message. 4294 * @param p6 parameter to the message. 4295 * @param p7 parameter to the message. 4296 * @param p8 parameter to the message. 4297 * @param p9 parameter to the message. 4298 */ 4299 void warn(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7, 4300 Object p8, Object p9); 4301 4302 }