Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
se2-application
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
s77550
se2-application
Commits
978a8c1d
Commit
978a8c1d
authored
5 years ago
by
Sven Graupner
Browse files
Options
Downloads
Patches
Plain Diff
Adjusted Logger interface to match log4j.
parent
02703be9
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/main/java/com/application/se2/misc/Logger.java
+16
-0
16 additions, 0 deletions
src/main/java/com/application/se2/misc/Logger.java
src/main/java/com/application/se2/misc/LoggerImpl.java
+32
-0
32 additions, 0 deletions
src/main/java/com/application/se2/misc/LoggerImpl.java
with
48 additions
and
0 deletions
src/main/java/com/application/se2/misc/Logger.java
+
16
−
0
View file @
978a8c1d
...
...
@@ -30,4 +30,20 @@ public interface Logger {
*/
public
void
log
(
final
LoggerTopics
topic
,
final
String
msg
,
final
Object
...
args
);
/**
* Public log methods for a variety of log levels:
* - debug()
* - info()
* - warn()
* - error()
* - fatal()
*
* @param message log message.
*/
public
void
info
(
String
message
);
public
void
warn
(
String
message
);
public
void
error
(
String
message
,
Exception
e
);
}
This diff is collapsed.
Click to expand it.
src/main/java/com/application/se2/misc/LoggerImpl.java
+
32
−
0
View file @
978a8c1d
...
...
@@ -36,6 +36,7 @@ class LoggerImpl implements Logger {
return
instance
;
}
/**
* Method to log a message.
*
...
...
@@ -106,4 +107,35 @@ class LoggerImpl implements Logger {
}
}
/**
* Print info message.
* @param message log message
*/
@Override
public
void
info
(
String
message
)
{
log
(
LoggerTopics
.
Info
,
message
);
}
/**
* Print warn message.
* @param message log message
*/
@Override
public
void
warn
(
String
message
)
{
log
(
LoggerTopics
.
Warn
,
message
);
}
/**
* Print error message.
* @param message log message
* @param exception optional exception object to log.
*/
@Override
public
void
error
(
String
message
,
Exception
exception
)
{
log
(
LoggerTopics
.
Error
,
message
);
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment