put ContextLogger in higher priority #1656

Merged
lunny merged 5 commits from koron/xorm:logger-priority into master 2020-07-09 06:45:04 +00:00
Contributor

SetLogger uses Logger when give a interface which implements both ContextLogger and Logger.
Because of Go's type switch uses prior case.

This PR makes xorm use ContextLogger in that case always.

`SetLogger` uses `Logger` when give a interface which implements both `ContextLogger` and `Logger`. Because of Go's type `switch` uses prior `case`. This PR makes xorm use `ContextLogger` in that case always.
Owner

tests failed.

tests failed.
Author
Contributor

failed test https://drone.gitea.com/xorm/xorm/1041/1/14

--- FAIL: TestUnscopeDelete (0.18s)
    --- PASS: TestUnscopeDelete/unscope_delete_struct (0.04s)
    session_delete_test.go:214: 
        	Error Trace:	session_delete_test.go:214
        	Error:      	Not equal: 
        	            	expected: 1586923543
        	            	actual  : 1586923544
        	Test:       	TestUnscopeDelete
    session_delete_test.go:226: 
        	Error Trace:	session_delete_test.go:226
        	Error:      	Not equal: 
        	            	expected: 1586923543
        	            	actual  : 1586923544
        	Test:       	TestUnscopeDelete
failed test https://drone.gitea.com/xorm/xorm/1041/1/14 ``` --- FAIL: TestUnscopeDelete (0.18s) --- PASS: TestUnscopeDelete/unscope_delete_struct (0.04s) session_delete_test.go:214: Error Trace: session_delete_test.go:214 Error: Not equal: expected: 1586923543 actual : 1586923544 Test: TestUnscopeDelete session_delete_test.go:226: Error Trace: session_delete_test.go:226 Error: Not equal: expected: 1586923543 actual : 1586923544 Test: TestUnscopeDelete ```
Author
Contributor

amended and force pushed to restart CI

amended and force pushed to restart CI
Author
Contributor

test passed w/o changes. just amend & force push.

test passed w/o changes. just amend & force push.
lunny added 11 commits 2020-07-08 14:57:39 +00:00
All checks were successful
continuous-integration/drone/push Build is passing
55594d1dbe
Oracle uses double quotes for quoting table/column/etc. names (#1674)
Oracle uses doulbe quotes for quoting table/column/etc. names

Reviewed-on: #1674
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
All checks were successful
continuous-integration/drone/push Build is passing
d485101331
chore: improve snakeCasedName performance (#1688)
chore: update

chore: udpate

chore: improve snakeCasedName performance

Co-authored-by: Bo-Yi Wu <appleboy.tw@gmail.com>
Reviewed-on: #1688
Reviewed-by: appleboy <appleboy.tw@gmail.com>
Some checks failed
continuous-integration/drone/push Build is failing
f071e5eb96
chore: improve titleCasedName performance (#1691)
udpate

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>

chore: improve titleCasedName performance

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>

Co-authored-by: Bo-Yi Wu <appleboy.tw@gmail.com>
Reviewed-on: #1691
All checks were successful
continuous-integration/drone/push Build is passing
b08f962d7a
Fix bug when ID used but no reference table given (#1709)
Fix bug when ID used but no reference table given

Reviewed-on: #1709
All checks were successful
continuous-integration/drone/tag Build is passing
continuous-integration/drone/push Build is passing
4dde8f14e6
Fix find and count bug (#1651)
Fix bug

fix mssql findandcount

Fix find and count bug

Reviewed-on: #1651
Some checks failed
continuous-integration/drone/push Build is failing
08a18027a0
Update README badges
All checks were successful
continuous-integration/drone/push Build is passing
b434b045ad
Add missing changelog for 1.0.2 (#1712)
Add missing changelog for 1.0.2

Reviewed-on: #1712
All checks were successful
continuous-integration/drone/push Build is passing
cc7d219065
Upgrade some dependencies (#1718)
Upgrade some dependencies

Reviewed-on: #1718
All checks were successful
continuous-integration/drone/push Build is passing
9b41b879a7
return the result on transaction (#1725)
return the result on transaction

Reviewed-on: #1725
All checks were successful
continuous-integration/drone/push Build is passing
677c0d7411
fix invalid date when update for oracle (#1694)
Merge branch 'master' into master

Merge branch 'master' into master

Merge branch 'master' into master

fix invalid date when update for oracle

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: chendy <dengyue.chen@ebaotech.com>
Reviewed-on: #1694
All checks were successful
continuous-integration/drone/pr Build is passing
a7df2e9470
Merge branch 'master' into logger-priority
lunny added 1 commit 2020-07-09 03:56:34 +00:00
All checks were successful
continuous-integration/drone/pr Build is passing
6ccf78a50b
Merge branch 'master' into logger-priority
lunny added the
kind
enhancement
label 2020-07-09 03:57:36 +00:00
lunny merged commit 56881e64a9 into master 2020-07-09 06:44:30 +00:00
koron deleted branch logger-priority 2021-06-24 06:31:26 +00:00
Sign in to join this conversation.
No description provided.