Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
spring-boot-admin
Project
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
openSource
spring-boot-admin
Commits
2cf29fd6
Commit
2cf29fd6
authored
Nov 16, 2016
by
Johannes Edmeier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use logger levels from /loggers
Since the logging backands may have different possible levels, we use the list provided by the /logging endpoint
parent
fe84e3ac
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
10 deletions
+10
-10
logger.tpl.html
...i/modules/applications-logging/components/logger.tpl.html
+4
-7
loggingCtrl.js
...i/modules/applications-logging/controllers/loggingCtrl.js
+5
-3
applicationLogging.js
...dules/applications-logging/services/applicationLogging.js
+1
-0
No files found.
spring-boot-admin-server-ui/modules/applications-logging/components/logger.tpl.html
View file @
2cf29fd6
{{ $ctrl.logger.name }}
<div
class=
"btn-group pull-right"
>
<label
class=
"btn btn-small"
ng-class=
"$ctrl.getLoggerClass('TRACE')"
ng-click=
"$ctrl.setLevel('TRACE')"
>
TRACE
</label>
<label
class=
"btn btn-small"
ng-class=
"$ctrl.getLoggerClass('DEBUG')"
ng-click=
"$ctrl.setLevel('DEBUG')"
>
DEBUG
</label>
<label
class=
"btn btn-small"
ng-class=
"$ctrl.getLoggerClass('INFO')"
ng-click=
"$ctrl.setLevel('INFO')"
>
INFO
</label>
<label
class=
"btn btn-small"
ng-class=
"$ctrl.getLoggerClass('WARN')"
ng-click=
"$ctrl.setLevel('WARN')"
>
WARN
</label>
<label
class=
"btn btn-small"
ng-class=
"$ctrl.getLoggerClass('ERROR')"
ng-click=
"$ctrl.setLevel('ERROR')"
>
ERROR
</label>
<label
class=
"btn btn-small"
ng-class=
"$ctrl.getLoggerClass('OFF')"
ng-click=
"$ctrl.setLevel('OFF')"
>
OFF
</label>
</div>
<button
ng-repeat=
"level in $ctrl.logger.levels"
class=
"btn btn-small"
ng-class=
"$ctrl.getLoggerClass(level)"
ng-click=
"$ctrl.setLevel(level)"
ng-bind=
"level"
></button>
</div>
\ No newline at end of file
spring-boot-admin-server-ui/modules/applications-logging/controllers/loggingCtrl.js
View file @
2cf29fd6
...
...
@@ -34,9 +34,10 @@ module.exports = function ($scope, application, ApplicationLogging) {
$scope
.
showPackageLoggers
=
!
$scope
.
showPackageLoggers
;
};
var
Logger
=
function
(
name
,
data
)
{
var
Logger
=
function
(
name
,
data
,
levels
)
{
this
.
name
=
name
;
this
.
level
=
data
.
configuredLevel
||
data
.
effectiveLevel
;
this
.
levels
=
levels
;
var
i
=
name
.
lastIndexOf
(
'.'
)
+
1
;
this
.
packageLogger
=
name
.
charAt
(
i
)
!==
name
.
charAt
(
i
).
toUpperCase
();
...
...
@@ -49,8 +50,9 @@ module.exports = function ($scope, application, ApplicationLogging) {
return
application
.
getLoggers
().
then
(
function
(
response
)
{
$scope
.
error
=
null
;
var
loggers
=
[];
angular
.
forEach
(
response
.
data
,
function
(
value
,
key
)
{
loggers
.
push
(
new
Logger
(
key
,
value
));
var
levels
=
response
.
data
.
levels
.
reverse
();
angular
.
forEach
(
response
.
data
.
loggers
,
function
(
value
,
key
)
{
loggers
.
push
(
new
Logger
(
key
,
value
,
levels
));
});
$scope
.
loggers
=
loggers
;
}).
catch
(
function
(
response
)
{
...
...
spring-boot-admin-server-ui/modules/applications-logging/services/applicationLogging.js
View file @
2cf29fd6
...
...
@@ -58,6 +58,7 @@ module.exports = function ($q, jolokia) {
var
Logger
=
function
(
name
)
{
this
.
name
=
name
;
this
.
level
=
null
;
this
.
levels
=
[
'TRACE'
,
'DEBUG'
,
'WARN'
,
'INFO'
,
'ERROR'
,
'OFF'
];
//Logback Default
var
i
=
name
.
lastIndexOf
(
'.'
)
+
1
;
this
.
packageLogger
=
name
.
charAt
(
i
)
!==
name
.
charAt
(
i
).
toUpperCase
();
...
...
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