JDBCタスクのログ
ログの活用
正常終了したか異常終了したかだけを気にしていれば、JDBCタスクのログを意識することはあまりないでしょう。 メタデータとして取得したテーブルの一覧が表示されるので、それが見当違いのテーブル(別のスキーマのテーブルとか、全く見知らぬテーブルとか)でなければ問題ありません。
ただ、ちょっと特殊な状況で挙動を期待通りでないような場合にログを見て分析をすることがあります。 問題解決するためにメーリングリストなどにフィードバックをする際はこのログの提示が重要です。
ログのExample
例えば、以下のようなログが出力されます。
e.g. dbflute-spring-example のJDBCタスクのログ (日付など一部省略) @Console
...$ sh jdbc.sh
/nnnnnnnnnnnnnnnnnnnnn
Execute the JDBC task.
nnnnnnnnnn/
Buildfile: ../mydbflute/dbflute-0.9.8.1/build-torque.xml
jdbc:
[echo] +-----------------------------------------------+
[echo] | |
[echo] | Generating XML from JDBC connection ! |
[echo] | |
[echo] +-----------------------------------------------+
[echo]
[echo] +-------------------------------------------------------------------------------+
[echo] contextProperties = build.properties
[echo] environmentType =
[echo] +-----------------+
[df-jdbc] ...276 INFO - ...Using contextProperties: build.properties
[df-jdbc] ...322 INFO - [Build-Properties]: size=1
[df-jdbc] ...322 INFO - torque.project = exampledb
[df-jdbc] ...324 INFO -
[df-jdbc] ...372 INFO - ...Creating data source:
[df-jdbc] ...373 INFO - driver = org.h2.driver
[df-jdbc] ...374 INFO - url = jdbc:h2:file:../src/main/resources/exampledb/exampledb
[df-jdbc] ...374 INFO - user = sa
[df-jdbc] ...396 INFO - ...Connecting to the database:
[df-jdbc] ...164 INFO - product = H2 1.3.150 (2011-01-28)
[df-jdbc] ...166 INFO - driver = H2 JDBC driver 1.3.150 (2011-01-28) for JDBC 3.0
[df-jdbc] ...166 INFO -
[df-jdbc] ...167 INFO - ...Starting to process JDBC to SchemaXML
[df-jdbc] ...167 INFO - ...Loading previous schema (schema diff process)
[df-jdbc] ...206 INFO - ...Resolving XML by database.dtd in same package
[df-jdbc] ...402 INFO - ...Instantiate DB-driver
[df-jdbc] ...404 INFO - ...Getting DB-connection
[df-jdbc] ...405 INFO - ...Getting DB-meta-data
[df-jdbc] ...406 INFO - ...Getting tables:
[df-jdbc] ...408 INFO - schema = {EXAMPLEDB.PUBLIC as main}
[df-jdbc] ...408 INFO - types = [TABLE, VIEW]
[df-jdbc] ...456 INFO -
[df-jdbc] ...456 INFO - $ /= = = = = = = = = = = = = = = = = = = = = = = = = =
[df-jdbc] ...457 INFO - $ [Table List]
[df-jdbc] ...458 INFO - $ EXAMPLEDB.PUBLIC.MEMBER(TABLE) // 会員: 会員登録時にInsertされる。...
[df-jdbc] ...515 INFO - $ EXAMPLEDB.PUBLIC.MEMBER_ADDRESS(TABLE) // 会員住所情報: 有効期間による履歴管理
[df-jdbc] ...531 INFO - $ EXAMPLEDB.PUBLIC.MEMBER_LOGIN(TABLE) // 会員ログイン: ログインの度にInsertされる
[df-jdbc] ...636 INFO - $ EXAMPLEDB.PUBLIC.MEMBER_SECURITY(TABLE) // 会員セキュリティ情報:
[df-jdbc] ...649 INFO - $ EXAMPLEDB.PUBLIC.MEMBER_SERVICE(TABLE) // 会員サービス: 会員のサービス情報(ポイントサービスなど)
[df-jdbc] ...659 INFO - $ EXAMPLEDB.PUBLIC.MEMBER_STATUS(TABLE) // 会員ステータス: 固定の区分値
[df-jdbc] ...693 INFO - $ EXAMPLEDB.PUBLIC.MEMBER_WITHDRAWAL(TABLE) // 会員退会情報: 退会するとInsertされる
[df-jdbc] ...704 INFO - $ EXAMPLEDB.PUBLIC.PRODUCT(TABLE) // 商品:
[df-jdbc] ...712 INFO - $ EXAMPLEDB.PUBLIC.PRODUCT_CATEGORY(TABLE) // 商品カテゴリ:
[df-jdbc] ...719 INFO - $ EXAMPLEDB.PUBLIC.PRODUCT_STATUS(TABLE) // 商品ステータス:
[df-jdbc] ...728 INFO - $ EXAMPLEDB.PUBLIC.PURCHASE(TABLE) // 購入: 購入の度ににInsertされる
[df-jdbc] ...750 INFO - $ EXAMPLEDB.PUBLIC.REGION(TABLE)
[df-jdbc] ...760 INFO - $ EXAMPLEDB.PUBLIC.SERVICE_RANK(TABLE) // サービスランク: 会員のサービスランク(プラチナ、ゴールドなど)
[df-jdbc] ...773 INFO - $ EXAMPLEDB.PUBLIC.VENDOR_$_DOLLAR(TABLE)
[df-jdbc] ...781 INFO - $ EXAMPLEDB.PUBLIC.VENDOR_CHECK(TABLE)
[df-jdbc] ...791 INFO - $ EXAMPLEDB.PUBLIC.WITHDRAWAL_REASON(TABLE)
[df-jdbc] ...800 INFO - $ EXAMPLEDB.PUBLIC.SUMMARY_PRODUCT(VIEW)
[df-jdbc] ...808 INFO - $ EXAMPLEDB.PUBLIC.SUMMARY_WITHDRAWAL(VIEW)
[df-jdbc] ...814 INFO - $
[df-jdbc] ...814 INFO - $ [Table Count]
[df-jdbc] ...814 INFO - $ 18
[df-jdbc] ...815 INFO - $ = = = = = = = = = =/
[df-jdbc] ...815 INFO -
[df-jdbc] ...817 INFO - ...Serializing XML:
[df-jdbc] ...817 INFO - filePath = ./schema/project-schema-exampledb.xml
[df-jdbc] ...817 INFO - encoding = UTF-8
[df-jdbc] ...889 INFO - ...Loading next schema (schema diff process)
[df-jdbc] ...891 INFO - ...Resolving XML by database.dtd in same package
[df-jdbc] ...955 INFO - -> same as previous
[df-jdbc] ...956 INFO - ...closeReally()
[df-jdbc] ...013 INFO -
[df-jdbc]
[df-jdbc] _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
[df-jdbc] [Task End]: 00m01s656ms
[df-jdbc]
[df-jdbc] DBFLUTE_CLIENT: {exampledb}
[df-jdbc] database = h2 (H2 1.3.150 (2011-01-28))
[df-jdbc] language = java
[df-jdbc] container = spring
[df-jdbc] package = com.example.dbflute.spring.dbflute
[df-jdbc]
[df-jdbc] DBFLUTE_ENVIRONMENT_TYPE: {df:default}
[df-jdbc] driver = org.h2.driver
[df-jdbc] url = jdbc:h2:file:../src/main/resources/exampledb/exampledb
[df-jdbc] schema = {EXAMPLEDB.PUBLIC as main}
[df-jdbc] user = sa
[df-jdbc] props = {}
[df-jdbc] additionalSchema =
[df-jdbc] dataLoadingType = ut
[df-jdbc] refreshProject = dbflute-spring-example
[df-jdbc] _/_/_/_/_/_/_/_/_/_/ {JDBC}
BUILD SUCCESSFUL
Total time: 3 seconds