Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
matrix
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
CI / CD
CI / CD
Pipelines
Schedules
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
mall
arch
matrix
Commits
d1a0d546
Commit
d1a0d546
authored
Aug 08, 2019
by
QIANGLU
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化逻辑
parent
45c874a3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
14 deletions
+2
-14
MatrixLogListenerConfiguration.java
logger-starter/secoo-log-starter/src/main/java/com/secoo/mall/logs/config/MatrixLogListenerConfiguration.java
+2
-14
No files found.
logger-starter/secoo-log-starter/src/main/java/com/secoo/mall/logs/config/MatrixLogListenerConfiguration.java
View file @
d1a0d546
...
@@ -44,7 +44,7 @@ public class MatrixLogListenerConfiguration {
...
@@ -44,7 +44,7 @@ public class MatrixLogListenerConfiguration {
private
void
refreshLoggingLevels
()
{
private
void
refreshLoggingLevels
()
{
Set
<
String
>
keyNames
=
config
.
getPropertyNames
();
Set
<
String
>
keyNames
=
config
.
getPropertyNames
();
for
(
String
key
:
keyNames
)
{
for
(
String
key
:
keyNames
)
{
if
(
containsIgnoreCase
(
key
,
LOGGER_TAG
))
{
if
(
StringUtils
.
startsWithIgnoreCase
(
key
,
LOGGER_TAG
))
{
String
strLevel
=
config
.
getProperty
(
key
,
"info"
);
String
strLevel
=
config
.
getProperty
(
key
,
"info"
);
LogLevel
level
=
LogLevel
.
valueOf
(
strLevel
.
toUpperCase
());
LogLevel
level
=
LogLevel
.
valueOf
(
strLevel
.
toUpperCase
());
loggingSystem
.
setLogLevel
(
key
.
replace
(
LOGGER_TAG
,
""
),
level
);
loggingSystem
.
setLogLevel
(
key
.
replace
(
LOGGER_TAG
,
""
),
level
);
...
@@ -53,17 +53,5 @@ public class MatrixLogListenerConfiguration {
...
@@ -53,17 +53,5 @@ public class MatrixLogListenerConfiguration {
}
}
}
}
private
static
boolean
containsIgnoreCase
(
String
str
,
String
searchStr
)
{
if
(
StringUtils
.
isEmpty
(
str
)
||
StringUtils
.
isEmpty
(
searchStr
))
{
return
false
;
}
int
len
=
searchStr
.
length
();
int
max
=
str
.
length
()
-
len
;
for
(
int
i
=
0
;
i
<=
max
;
i
++)
{
if
(
str
.
regionMatches
(
true
,
i
,
searchStr
,
0
,
len
))
{
return
true
;
}
}
return
false
;
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment