With current log4j.xml shown below, I get logs like ‘select * from users where user_id = ?’
<logger name="com.ibatis">
<level value="debug"/>
<appender-ref ref="IBATIS"/>
</logger>
<logger name="java.sql">
<level value="debug"/>
<appender-ref ref="IBATIS"/>
</logger>
The way I understand the documentation of ibatis the logging of the queries is delegated to the standard JDBC classes in the java.sql package. Now, your sample log output indicates that a prepared statement is used. The way that these normally work is that the prepared statement (including the question mark placeholders) is sent to the database server in advance. The actual values are sent separately when they have been bound and the query is executed. As a direct result, the expanded query (the log output that you expect to get) is never actually constructed on the client side, but rather on the database server itself.
However, there are ways around this problem. You should be able to refer to the answer proposed here for a possible solution:
Logging PreparedStatements in Java