5
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

MyBatisのログ整形

Posted at

MyBatisで出力されるログの整形ツールを作りました。
…ツール本当にいるのかな…設定でなんとかなったりしたらすみません。

環境

  • MyBatis3.2.3
  • Oracle11g

使い方

こんな感じのSQLとパラメータが連続する2行をコピーして

ログサンプル
[DEBUG:selectByPrimaryKey] ==>  Preparing: select USER_ID, START_DATE, MST_USER_ID, USERNM_SEI, USERNM_MEI, PASSWORD, MST_DEPT_ID, ROLE_ID, END_DATE, VERSION_NO from SADB.MST_USER where USER_ID = ? and START_DATE = ? 
[DEBUG:selectByPrimaryKey] ==> Parameters: 1(String), 2014-11-10(Date)

以下URLにアクセスして
http://jsfiddle.net/ko_aoki/tuqaxunk/3/embedded/result/

mybatisFormat.png

上部テキストエリアにペーストして「format」を押下。

かなりざっくりなので、整形できないSQLもあるかもですが。。

5
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?