Hi I currently have this in my .properties file:
java.util.logging.FileHandler.pattern = %h/programName%u%g.log
I would also like to append a timestamp / username to this so its easy to identify log files does anyone know how?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Since the FileHandler methods don’t have a % substitution variable for date, my suggestion would be to format a string that includes the date before passing the string to FileHandler. Something like: