Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
neo4jRelation
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
qiuchaofei
neo4jRelation
Commits
09ba54ec
Commit
09ba54ec
authored
Apr 20, 2022
by
qiuchaofei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.添加操作日志。
parent
55bfda44
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
69 additions
and
0 deletions
+69
-0
LogConstants.java
...obile/metadata/metadataRelation/logging/LogConstants.java
+9
-0
LogManager.java
...ymobile/metadata/metadataRelation/logging/LogManager.java
+56
-0
logback-custom.xml
src/main/resources/logback-custom.xml
+4
-0
No files found.
src/main/java/com/keymobile/metadata/metadataRelation/logging/LogConstants.java
0 → 100644
View file @
09ba54ec
package
com
.
keymobile
.
metadata
.
metadataRelation
.
logging
;
public
interface
LogConstants
{
public
static
final
String
CTX_Relation
=
"metadata.relation"
;
// public static final String CTX_HARVESTERTASK = "harvester.HARVESTERTASK";
// public static final String CTX_TASKSCHEDULE = "harvester.TASKSCHEDULE";
// public static final String CTX_TASKEXTRACTDETAIL = "harvester.TASKEXTRACTDETAIL";
}
src/main/java/com/keymobile/metadata/metadataRelation/logging/LogManager.java
0 → 100644
View file @
09ba54ec
package
com
.
keymobile
.
metadata
.
metadataRelation
.
logging
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
public
class
LogManager
{
public
static
void
logTrace
(
String
context
,
Throwable
e
,
String
message
)
{
Logger
logger
=
LoggerFactory
.
getLogger
(
context
);
if
(
logger
.
isTraceEnabled
())
{
logger
.
trace
(
message
,
e
);
}
}
public
static
void
logTrace
(
String
context
,
String
message
)
{
logTrace
(
context
,
null
,
message
);
}
public
static
void
logDebug
(
String
context
,
String
message
)
{
Logger
logger
=
LoggerFactory
.
getLogger
(
context
);
if
(
logger
.
isDebugEnabled
())
{
logger
.
debug
(
message
);
}
}
public
static
void
logInfo
(
String
context
,
String
message
)
{
Logger
logger
=
LoggerFactory
.
getLogger
(
context
);
if
(
logger
.
isInfoEnabled
())
{
logger
.
info
(
message
);
}
}
public
static
void
logWarning
(
String
context
,
Throwable
e
,
String
message
)
{
Logger
logger
=
LoggerFactory
.
getLogger
(
context
);
if
(
logger
.
isWarnEnabled
())
{
logger
.
warn
(
message
,
e
);
}
}
public
static
void
logWarning
(
String
context
,
String
message
)
{
logWarning
(
context
,
null
,
message
);
}
public
static
void
logError
(
String
context
,
Throwable
e
,
String
message
)
{
Logger
logger
=
LoggerFactory
.
getLogger
(
context
);
if
(
logger
.
isErrorEnabled
())
{
logger
.
error
(
message
,
e
);
}
}
public
static
void
logError
(
String
context
,
String
message
)
{
logError
(
context
,
message
);
}
}
src/main/resources/logback-custom.xml
View file @
09ba54ec
...
...
@@ -38,6 +38,10 @@
</additionalField>
</appender>
<logger
name=
"metadata.relation"
>
<appender-ref
ref=
"logstash"
/>
</logger>
<root
level=
"INFO"
>
<appender-ref
ref=
"stdout"
/>
</root>
...
...
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