Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6725399
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T09:48:09+00:00 2026-05-26T09:48:09+00:00

With current log4j.xml shown below, I get logs like ‘select * from users where

  • 0

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>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T09:48:10+00:00Added an answer on May 26, 2026 at 9:48 am

    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

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to set the log file name for a log4j and log4net
Current query : SELECT order_id AS OrderNumber, ordName, ordLastName, question, answer FROM cart_survey JOIN
Current Query: SELECT DISTINCT HSP.HSP_ACCOUNT_ID, HSP.HSP_ACCOUNT_NAME, HSP.ADM_DATE_TIME, HSP.DISCH_DATE_TIME, HSP.TOT_CHGS, HSP_ACCT_MULT_DRGS.DRG_ID_TYPE_ID, HSP_ACCT_MULT_DRGS.DRG_MPI_CODE FROM C.HSP HSP
Current query SELECT * FROM employee AS E INNER JOIN credential AS C ON
Current verbose rails path helpers I'm constantly writing code to get URLs like: link_to
Current situation: Ubuntu 8.04 server edition (live server) Postgresql 8.3.7 (from standard repositories) Postgis
My current project is in Rails. Coming from a Symfony (PHP) and Django (Python)
I am used to using Tomcat/Log4J for my logging. My current project is deployed
I want to implement a Custom logger which logs all log entries to a
I created a new Logger object like this: log4cplus::Logger m_WebAccessLogger; //a class member Then

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.