Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
9bebacd6
Commit
9bebacd6
authored
Oct 04, 2014
by
Ciro Santilli
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Dry admin logs.
parent
ac71c386
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
44 additions
and
69 deletions
+44
-69
app/views/admin/logs/show.html.haml
app/views/admin/logs/show.html.haml
+22
-65
lib/gitlab/app_logger.rb
lib/gitlab/app_logger.rb
+2
-2
lib/gitlab/git_logger.rb
lib/gitlab/git_logger.rb
+2
-2
lib/gitlab/logger.rb
lib/gitlab/logger.rb
+4
-0
lib/gitlab/production_logger.rb
lib/gitlab/production_logger.rb
+7
-0
lib/gitlab/sidekiq_logger.rb
lib/gitlab/sidekiq_logger.rb
+7
-0
No files found.
app/views/admin/logs/show.html.haml
View file @
9bebacd6
-
loggers
=
[
Gitlab
::
GitLogger
,
Gitlab
::
AppLogger
,
Gitlab
::
ProductionLogger
,
Gitlab
::
SidekiqLogger
]
%ul
.nav.nav-tabs.log-tabs
%ul
.nav.nav-tabs.log-tabs
%li
.active
-
loggers
.
each
do
|
klass
|
=
link_to
"githost.log"
,
"#githost"
,
'data-toggle'
=>
'tab'
%li
{
class:
(
klass
==
Gitlab
::
GitLogger
?
'active'
:
''
)
}
%li
=
link_to
klass
::
file_name
,
"#
#{
klass
::
file_name_noext
}
"
,
=
link_to
"application.log"
,
"#application"
,
'data-toggle'
=>
'tab'
'data-toggle'
=>
'tab'
%li
=
link_to
"production.log"
,
"#production"
,
'data-toggle'
=>
'tab'
%li
=
link_to
"sidekiq.log"
,
"#sidekiq"
,
'data-toggle'
=>
'tab'
%p
.light
To prevent performance issues admin logs output the last 2000 lines
%p
.light
To prevent performance issues admin logs output the last 2000 lines
.tab-content
.tab-content
.tab-pane.active
#githost
-
loggers
.
each
do
|
klass
|
.file-holder
#README
.tab-pane
{
class:
(
klass
==
Gitlab
::
GitLogger
?
'active'
:
''
),
.file-title
id:
klass
::
file_name_noext
}
%i
.fa.fa-file
githost.log
.pull-right
=
link_to
'#'
,
class:
'log-bottom'
do
%i
.fa.fa-arrow-down
Scroll down
.file-content.logs
%ol
-
Gitlab
::
GitLogger
.
read_latest
.
each
do
|
line
|
%li
%p
=
line
.tab-pane
#application
.file-holder
#README
.file-title
%i
.fa.fa-file
application.log
.pull-right
=
link_to
'#'
,
class:
'log-bottom'
do
%i
.fa.fa-arrow-down
Scroll down
.file-content.logs
%ol
-
Gitlab
::
AppLogger
.
read_latest
.
each
do
|
line
|
%li
%p
=
line
.tab-pane
#production
.file-holder
#README
.file-title
%i
.fa.fa-file
production.log
.pull-right
=
link_to
'#'
,
class:
'log-bottom'
do
%i
.fa.fa-arrow-down
Scroll down
.file-content.logs
%ol
-
Gitlab
::
Logger
.
read_latest_for
(
'production.log'
).
each
do
|
line
|
%li
%p
=
line
.tab-pane
#sidekiq
.file-holder
#README
.file-holder
#README
.file-title
.file-title
%i
.fa.fa-file
%i
.fa.fa-file
sidekiq.log
=
klass
::
file_name
.pull-right
.pull-right
=
link_to
'#'
,
class:
'log-bottom'
do
=
link_to
'#'
,
class:
'log-bottom'
do
%i
.fa.fa-arrow-down
%i
.fa.fa-arrow-down
Scroll down
Scroll down
.file-content.logs
.file-content.logs
%ol
%ol
-
Gitlab
::
Logger
.
read_latest_for
(
'sidekiq.log'
)
.
each
do
|
line
|
-
klass
.
read_latest
.
each
do
|
line
|
%li
%li
%p
=
line
%p
=
line
lib/gitlab/app_logger.rb
View file @
9bebacd6
module
Gitlab
module
Gitlab
class
AppLogger
<
Gitlab
::
Logger
class
AppLogger
<
Gitlab
::
Logger
def
self
.
file_name
def
self
.
file_name
_noext
'application
.log
'
'application'
end
end
def
format_message
(
severity
,
timestamp
,
progname
,
msg
)
def
format_message
(
severity
,
timestamp
,
progname
,
msg
)
...
...
lib/gitlab/git_logger.rb
View file @
9bebacd6
module
Gitlab
module
Gitlab
class
GitLogger
<
Gitlab
::
Logger
class
GitLogger
<
Gitlab
::
Logger
def
self
.
file_name
def
self
.
file_name
_noext
'githost
.log
'
'githost'
end
end
def
format_message
(
severity
,
timestamp
,
progname
,
msg
)
def
format_message
(
severity
,
timestamp
,
progname
,
msg
)
...
...
lib/gitlab/logger.rb
View file @
9bebacd6
module
Gitlab
module
Gitlab
class
Logger
<
::
Logger
class
Logger
<
::
Logger
def
self
.
file_name
file_name_noext
+
'.log'
end
def
self
.
error
(
message
)
def
self
.
error
(
message
)
build
.
error
(
message
)
build
.
error
(
message
)
end
end
...
...
lib/gitlab/production_logger.rb
0 → 100644
View file @
9bebacd6
module
Gitlab
class
ProductionLogger
<
Gitlab
::
Logger
def
self
.
file_name_noext
'production'
end
end
end
lib/gitlab/sidekiq_logger.rb
0 → 100644
View file @
9bebacd6
module
Gitlab
class
SidekiqLogger
<
Gitlab
::
Logger
def
self
.
file_name_noext
'sidekiq'
end
end
end
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