fork(4) download
  1. /* package whatever; // don't place package name! */
  2.  
  3. import java.util.*;
  4. import java.lang.*;
  5. import java.io.*;
  6. import lombok.extern.log4j.Log4j2;
  7.  
  8. /* Name of the class has to be "Main" only if the class is public. */
  9. @Log4j2
  10. class Ideone
  11. {
  12. public static void main (String[] args) throws java.lang.Exception
  13. {
  14. logger.error("one two three: {} {} {}", "a", "b",
  15. "c", new Exception("something went wrong"));
  16. }
  17. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Main.java:6: error: package lombok.extern.log4j does not exist
import lombok.extern.log4j.Log4j2;
                          ^
Main.java:9: error: cannot find symbol
@Log4j2
 ^
  symbol: class Log4j2
Main.java:14: error: cannot find symbol
		logger.error("one two three: {} {} {}", "a", "b", 
		^
  symbol:   variable logger
  location: class Ideone
3 errors
stdout
Standard output is empty