Okay. You really mean "How can I get the logging output from these statements into a file", right? You don't want the Java statements to be in a file, do you?
You will find programming is easier if you express yourself clearly. If you can't express what you want to do, you won't be able to write a program to do that.
But anyway, back to the question. Your properties file specifies a ConsoleAppender and nothing else. That's why the logging output goes to the console and nowhere else. If you want it to go to a file then you need to specify a FileAppender in the properties file.