Date in log4j



  • Got a little web application. I wrote a logger to him. I need the information and the date of time and what happened.
    The point is, the time indicated in the logs is probably taken by some default clock potion. How do you make the right time?

    %d {HH:mm:ss}{GMT+3}
    

    It didn't work.



  • It's probably a bug from the Sun. Timezone Updater Tool from Oracle didn't even help.
    I solved the problem:

    -Duser.timezone="Регион/город"
    

    This line should be added to the Java challenge line:

    java -Duser.timezone="Регион/город" my.super.Class
    

Log in to reply
 


Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2