############################## Configuration's Aim #################################
This library's aim is...
In develope we use many framework and tools.
developer's important work is developing PL/SQL.
Many tools and Framework support All Layers.
View, Model, and Controller or DataAcess Layer...
So developer can concentrate business logic. And i think business logics is PL/SQL.
All PL/SQL works repeat Make query And executioning And debugging.
In that case we can use only jdbc or Connection Pooling(Apache DBCP) or support 2PC(JTA,JOTM).
In many case Also we use ORM(Object Relation Mapping) ibatis or springJDBC or hibernate...
Then problem occurs "My Query How to Work! And Parameters is correct?"
So I think easy And light Configuration change But Very Usefull!
############################## Configuration's Aim #################################
Configuration file location is [nano-log.jar]/log/position_ko_KR.properties
if you open useing any text editor then like below
#DEBUG=0,INFO=1,WARNING=2,FATAL=3, ERROR=4, LOGGING_OFF=5
log.level=0
query.logging.position.fixed.select=true
query.logging.position.fixed.none_select=true
query.logging.position.select=8
query.logging.position.none_select=9
query.logging.view.position=true
############################## installation #################################
1. first you copy nano-log.jar in your classpath
2. change your configuration driivers below
-below-
if you use ORACLE_DRIVER then
<driver type="oracle.jdbc.driver.OracleDriver">
To
<driver type="core.log.jdbc.driver.OracleDriver">
Other dervier's driver class name is below
-below-
MYSQL_DRIVER="com.mysql.jdbc.Driver";
SYBASE_DRIVER="com.sybase.jdbc3.jdbc.SybDriver";
MSSQL_DRIVER="com.microsoft.jdbc.sqlserver.SQLServerDriver";
DB2_DRIVER="com.ibm.db2.jcc.DB2Driver";
INFOMIX_DRIVER="com.informix.jdbc.IfxDriver";
POSTGRESQL_DRIVER="org.postgresql.Driver";
MAXDB_DRIVER="com.sap.dbtech.jdbc.DriverSapDB";
FRONTBASE_DRIVER="com.frontbase.jdbc.FBJDriver";
HSQL_DRIVER="org.hsqldb.jdbcDriver";
POINTBASE_DRIVER="com.pointbase.jdbc.jdbcUniversalDriver";
MIMER_DRIVER="com.mimer.jdbc.Driver";
PERVASIVE_DRIVER="com.pervasive.jdbc.v2.Driver";
DAFFODILDB_DRIVER="in.co.daffodil.db.jdbc.DaffodilDBDriver";
JDATASTORE_DRIVER="com.borland.datastore.jdbc.DataStoreDriver";
CACHE_DRIVER="com.intersys.jdbc.CacheDriver";
DERBY_DRIVER="org.apache.derby.jdbc.ClientDriver";
############################## installation #################################
############################## configuration #################################
1.
log.level means
like Log4j's log level default log level is debug.
if you change log level else 0 then you will see upper log that your choice log level
ex)
[2007-11-02 16:58:32] [DEBUG]¡ºcom.sds.maxigent.webconsole.common.GeneralDAO:selectData(38)¡» Elapsed Time [0:00:00.000]
SELECT SYS_GUID() FROM DUAL
2.
query.logging.position.fixed.select means
In select query...
this library can use many case developement. so we don't know your source arch.
if you chang value 'false' then log will trace excutioning.
ex)
[Position Check Start :
SELECT SESSION_ID, USER_ID, LOGIN_DATE, REP_IP, LOGOUT_DATE, LOGOUT_TYPE, RAW_SESSION_ID
FROM G_LOGIN_LOG
WHERE SESSION_ID = 'AC97E8835EDF42448CC2BAD471A34E5F' /**¨Ü*/
]
############## BELOW MESSAGE IS TRACE. NO ERROR! ##############
[0] at core.log.logger.SL.getMessageThrowable(SL.java:178)
[1] at core.log.logger.SL.logSqlSelect(SL.java:311)
[2] at core.log.aop.reflection.handler.DaoInfo.loggingDaoR(DaoInfo.java:122)
[3] at core.log.aop.reflection.handler.DaoInfo.doAround(DaoInfo.java:87)
[4] at core.log.aop.reflection.profiler.AroundProfiler.invoke(AroundProfiler.java:18)
[5] at $Proxy0.executeQuery(Unknown Source)
[6] at com.caucho.sql.UserPreparedStatement.executeQuery(UserPreparedStatement.java:108)
[7] at com.sds.maxigent.webconsole.dao.DBFunction.getDataList(DBFunction.java:435)
[8] at com.sds.maxigent.webconsole.common.GeneralDAO.selectData(GeneralDAO.java:38)
[9] at com.sds.maxigent.webconsole.admin.login.SessionManager.getSessionInfoById(SessionManager.java:57)
[10] at com.sds.maxigent.webconsole.admin.login.SessionManager.createSessionInfo(SessionManager.java:37)
[11] at com.sds.maxigent.webcons...
[Position Check End]
3.
query.logging.position.fixed.none_select means
In update, delete, insert query...
this library can use many case developement. so we don't know your source arch.
if you chang value 'false' then log will trace excutioning.
ex)
[Position Check Start :
INSERT INTO G_LOGIN_LOG (SESSION_ID, USER_ID, LOGIN_DATE, REP_IP,
LOGOUT_DATE, LOGOUT_TYPE, RAW_SESSION_ID)
VALUES( 'AC97E8835EDF42448CC2BAD471A34E5F' /**¨Ü*/, 'maxigent' /**¨Ü*/, TO_CHAR(SYSDATE, 'YYYYMMDDHH24MISS'), '127.0.0.1' /**¨Ü*/, '', '', 'abcAMYmu93sIbgx8Kx-xr' /**¨Ü*/)
]
############## BELOW MESSAGE IS TRACE. NO ERROR! ##############
[0] at core.log.logger.SL.getMessageThrowable(SL.java:178)
[1] at core.log.logger.SL.logSqlNoneSelect(SL.java:322)
[2] at core.log.aop.reflection.handler.DaoInfo.loggingDaoCUD(DaoInfo.java:170)
[3] at core.log.aop.reflection.handler.DaoInfo.doAround(DaoInfo.java:90)
[4] at core.log.aop.reflection.profiler.AroundProfiler.invoke(AroundProfiler.java:18)
[5] at $Proxy0.executeUpdate(Unknown Source)
[6] at com.caucho.sql.UserPreparedStatement.executeUpdate(UserPreparedStatement.java:117)
[7] at com.caucho.sql.UserPreparedStatement.executeUpdate(UserPreparedStatement.java:117)
[8] at com.sds.maxigent.webconsole.dao.DBFunction.insertData(DBFunction.java:113)
[9] at com.sds.maxigent.webconsole.common.GeneralDAO.insertData(GeneralDAO.java:69)
[10] at com.sds.maxigent.webconsole.admin.login.SessionManager.createSessionInfo(SessionManager.java:35)
[11] at com.sds.maxigent.webcons...
[Position Check End]
4.
query.logging.position.select means
the logging position what you want to see.
this example's 'query.logging.position.select=8' so you can see below
-below-
[2007-11-02 16:58:32] [DEBUG]¡ºcom.sds.maxigent.webconsole.common.GeneralDAO:selectData(38)¡» Elapsed Time [0:00:00.000]
SELECT SESSION_ID, USER_ID, LOGIN_DATE, REP_IP, LOGOUT_DATE, LOGOUT_TYPE, RAW_SESSION_ID
FROM G_LOGI...
[0] at core.log.logger.SL.getMessageThrowable(SL.java:178)
[1] at core.log.logger.SL.logSqlSelect(SL.java:311)
[2] at core.log.aop.reflection.handler.DaoInfo.loggingDaoR(DaoInfo.java:122)
[3] at core.log.aop.reflection.handler.DaoInfo.doAround(DaoInfo.java:87)
[4] at core.log.aop.reflection.profiler.AroundProfiler.invoke(AroundProfiler.java:18)
[5] at $Proxy0.executeQuery(Unknown Source)
[6] at com.caucho.sql.UserPreparedStatement.executeQuery(UserPreparedStatement.java:108)
[7] at com.sds.maxigent.webconsole.dao.DBFunction.getDataList(DBFunction.java:435)
-->[8] at com.sds.maxigent.webconsole.common.GeneralDAO.selectData(GeneralDAO.java:38)
[9] at com.sds.maxigent.webconsole.admin.login.SessionManager.getSessionInfoById(SessionManager.java:57)
[10] at com.sds.maxigent.webco...
5.
query.logging.position.none_select means same upper in insert, update, delete
6.
query.logging.view.position means
Our aim to logging sql is target preparedstatement's level(also logging statement).
Parameters matched in query But SM developers dont know where is parameter where is hardcoded.
so we suppose that. sigh is '/**¨Ü*/'
if you 'query.logging.view.position=true' then
ex)
SELECT a.MENU_SEQ
, a.INSERT_YN
, a.UPDATE_YN
, a.DELETE_YN
from G_ASSIGN_M_GROUP a
where a.GROUP_CODE = '000000000001' /**¨Ü*/
if you 'query.logging.view.position=false' then
ex)
SELECT a.MENU_SEQ
, a.INSERT_YN
, a.UPDATE_YN
, a.DELETE_YN
from G_ASSIGN_M_GROUP a
where a.GROUP_CODE = '000000000001'
############################## configuration #################################
############################## Author information #################################
if you any question go to http://insup.blogspot.com
and write your message. asp I'll explain of your question if i possible.
Blog : http://insup.blogspot.com
Mail : insup74@empal.com
Google Code : nano-log[involved]
Sourceforge.net : jorm[Status APT]
Good luck!
############################## Author information #################################