Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reflect: Remove log4jdbc-remix #417

Closed
3 tasks done
btkobayashirun opened this issue Dec 23, 2019 · 1 comment
Closed
3 tasks done

Reflect: Remove log4jdbc-remix #417

btkobayashirun opened this issue Dec 23, 2019 · 1 comment
Assignees

Comments

@btkobayashirun
Copy link
Contributor

btkobayashirun commented Dec 23, 2019

Description

Possible Solutions

TBD

Affects Version/s

  • 5.6.0.RELEASE

Fix Version/s

  • terasoluna-gfw-web-blank
  • m-j
  • m-t

Issue Links

  • #XXX
btkobayashirun added a commit that referenced this issue Dec 23, 2019
btkobayashirun added a commit that referenced this issue Dec 24, 2019
btkobayashirun added a commit that referenced this issue Dec 24, 2019
btkobayashirun added a commit that referenced this issue Dec 26, 2019
btkobayashirun added a commit that referenced this issue Jan 15, 2020
yoshikawaa added a commit that referenced this issue Jan 23, 2020
@yoshikawaa yoshikawaa reopened this Feb 6, 2020
@btkobayashirun btkobayashirun changed the title Remove log4jdbc-remix Reflect: Remove log4jdbc-remix Feb 27, 2020
@yoshikawaa yoshikawaa reopened this Mar 19, 2020
@yoshikawaa
Copy link
Contributor

Using MyBatis::

MyBatis ResultSetLogger logs data update / acquisition count at DEBUG level, but can also log data acquired at TRACE level.

DEBUG lebel logs

  • logback.xml
    <!-- Application Loggers -->
    <logger name="com.example">
        <level value="debug" />
    </logger>
  • output logs
... level:DEBUG	logger:c.e.domain.repository.todo.TodoRepository.create	message:==>  Preparing: INSERT INTO todo ( todo_id, todo_title, finished, created_at ) VALUES ( ?, ?, ?, ? ) 
... level:DEBUG	logger:c.e.domain.repository.todo.TodoRepository.create	message:==> Parameters: 001(String), todo 001(String), false(Boolean), 2020-03-19T13:42:53.211(LocalDateTime)
... level:DEBUG	logger:c.e.domain.repository.todo.TodoRepository.create	message:<==    Updates: 1
... level:DEBUG	logger:c.e.d.repository.todo.TodoRepository.findAll    	message:==>  Preparing: SELECT todo_id, todo_title, finished, created_at FROM todo 
... level:DEBUG	logger:c.e.d.repository.todo.TodoRepository.findAll    	message:==> Parameters: 
... level:DEBUG	logger:c.e.d.repository.todo.TodoRepository.findAll    	message:<==      Total: 1

TRACE lebel logs

  • logback.xml
    <!-- Application Loggers -->
    <logger name="com.example">
        <level value="debug" />
    </logger>
    <!-- only for development -->
    <logger name="com.example.domain.repository">
        <level value="trace" />
    </logger>
  • output logs
... level:DEBUG	logger:c.e.domain.repository.todo.TodoRepository.create	message:==>  Preparing: INSERT INTO todo ( todo_id, todo_title, finished, created_at ) VALUES ( ?, ?, ?, ? ) 
... level:DEBUG	logger:c.e.domain.repository.todo.TodoRepository.create	message:==> Parameters: 001(String), todo 001(String), false(Boolean), 2020-03-19T13:42:53.211(LocalDateTime)
... level:DEBUG	logger:c.e.domain.repository.todo.TodoRepository.create	message:<==    Updates: 1
... level:DEBUG	logger:c.e.d.repository.todo.TodoRepository.findAll    	message:==>  Preparing: SELECT todo_id, todo_title, finished, created_at FROM todo 
... level:DEBUG	logger:c.e.d.repository.todo.TodoRepository.findAll    	message:==> Parameters: 
... level:TRACE	logger:c.e.d.repository.todo.TodoRepository.findAll    	message:<==    Columns: TODO_ID, TODO_TITLE, FINISHED, CREATED_AT
... level:TRACE	logger:c.e.d.repository.todo.TodoRepository.findAll    	message:<==        Row: 001, todo 001, FALSE, 2020-03-19 13:42:53.211
... level:DEBUG	logger:c.e.d.repository.todo.TodoRepository.findAll    	message:<==      Total: 1

You can see ResultSet logs provided by Log4Jdbc in MyBatis TRACE logs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants