I am able to create log files using FileAppender, RollingFileAppender,etc.,
My Problem is that the logs are written as plain text that anyone can read, but I want to register my logs as Binary Files that are not human readable.
Can anyone help me with the suggestion to create a Binary log file for an example code.
Its not such a good Idea to do what you wrote, but if you really need to, write an own appender like this:
Then in your log4j config use this class as appender and you are done with the writing part. for the reading part you again need to read it byte per byte and reduce the byte by one and then load a string from it.
Good luck.