I have added log4j.properties
file in source folder of project but I am still getting a log4j:error.
Here is my Log4j.properties file:
this error is coming because of appender file location you have provided is not reachable with current user access.
Quick Solution, change the log4j.appender.FILE.File setting to point to file using absolute path which location is reachable to the current user you have logged in, for example /tmp/myapp.log. Now You should not get an error.
Please changes your log file location to another drive. it will work.
this happen's the permission of creating log file.
I had the exact same problem. Here is the solution that worked for me: simply put your properties file path in the cmd line this way :
-Dlog4j.configuration=<FILE_PATH> (ex: log4j.properties)
Hope this will help you
To prevent this isue I changed all values in log4j.properties file with directory ${kafka.logs.dir} to my own directory. For example D:/temp/...