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
e1b7e11b
Commit
e1b7e11b
authored
Sep 08, 2020
by
Rajendra Kadam
Committed by
Peter Leitzen
Sep 08, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use applogger in lib/gitlab/*
parent
b720d175
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
13 additions
and
8 deletions
+13
-8
changelogs/unreleased/app-logger-12.yml
changelogs/unreleased/app-logger-12.yml
+5
-0
lib/gitlab/background_migration/calculate_wiki_sizes.rb
lib/gitlab/background_migration/calculate_wiki_sizes.rb
+1
-1
lib/gitlab/background_migration/fill_valid_time_for_pages_domain_certificate.rb
...migration/fill_valid_time_for_pages_domain_certificate.rb
+1
-1
lib/gitlab/cleanup/orphan_job_artifact_files.rb
lib/gitlab/cleanup/orphan_job_artifact_files.rb
+1
-1
lib/gitlab/cleanup/orphan_job_artifact_files_batch.rb
lib/gitlab/cleanup/orphan_job_artifact_files_batch.rb
+1
-1
lib/gitlab/cleanup/orphan_lfs_file_references.rb
lib/gitlab/cleanup/orphan_lfs_file_references.rb
+1
-1
lib/gitlab/cleanup/project_upload_file_finder.rb
lib/gitlab/cleanup/project_upload_file_finder.rb
+1
-1
lib/gitlab/cleanup/project_uploads.rb
lib/gitlab/cleanup/project_uploads.rb
+1
-1
lib/gitlab/cleanup/remote_uploads.rb
lib/gitlab/cleanup/remote_uploads.rb
+1
-1
No files found.
changelogs/unreleased/app-logger-12.yml
0 → 100644
View file @
e1b7e11b
---
title
:
Use applogger in lib/gitlab
merge_request
:
41063
author
:
Rajendra Kadam
type
:
other
lib/gitlab/background_migration/calculate_wiki_sizes.rb
View file @
e1b7e11b
...
...
@@ -10,7 +10,7 @@ module Gitlab
.
includes
(
project:
[
:route
,
:group
,
namespace:
[
:owner
]]).
find_each
do
|
statistics
|
statistics
.
refresh!
(
only:
[
:wiki_size
])
rescue
=>
e
Rails
.
logger
.
error
"Failed to update wiki statistics. id:
#{
statistics
.
id
}
message:
#{
e
.
message
}
"
# rubocop:disable Gitlab/RailsLogger
Gitlab
::
AppLogger
.
error
"Failed to update wiki statistics. id:
#{
statistics
.
id
}
message:
#{
e
.
message
}
"
end
end
end
...
...
lib/gitlab/background_migration/fill_valid_time_for_pages_domain_certificate.rb
View file @
e1b7e11b
...
...
@@ -25,7 +25,7 @@ module Gitlab
certificate_valid_not_after:
domain
.
x509
&
.
not_after
&
.
iso8601
)
rescue
=>
e
Rails
.
logger
.
error
"Failed to update pages domain certificate valid time. id:
#{
domain
.
id
}
, message:
#{
e
.
message
}
"
# rubocop:disable Gitlab/RailsLogger
Gitlab
::
AppLogger
.
error
"Failed to update pages domain certificate valid time. id:
#{
domain
.
id
}
, message:
#{
e
.
message
}
"
end
end
end
...
...
lib/gitlab/cleanup/orphan_job_artifact_files.rb
View file @
e1b7e11b
...
...
@@ -18,7 +18,7 @@ module Gitlab
@limit
=
limit
@dry_run
=
dry_run
@niceness
=
(
niceness
||
DEFAULT_NICENESS
).
downcase
@logger
=
logger
||
Rails
.
logger
# rubocop:disable Gitlab/Rails
Logger
@logger
=
logger
||
Gitlab
::
App
Logger
@total_found
=
@total_cleaned
=
0
new_batch!
...
...
lib/gitlab/cleanup/orphan_job_artifact_files_batch.rb
View file @
e1b7e11b
...
...
@@ -22,7 +22,7 @@ module Gitlab
attr_reader
:batch_size
,
:dry_run
attr_accessor
:artifact_files
def
initialize
(
batch_size
:,
dry_run:
true
,
logger:
Rails
.
logger
)
# rubocop:disable Gitlab/RailsLogger
def
initialize
(
batch_size
:,
dry_run:
true
,
logger:
Gitlab
::
AppLogger
)
@batch_size
=
batch_size
@dry_run
=
dry_run
@logger
=
logger
...
...
lib/gitlab/cleanup/orphan_lfs_file_references.rb
View file @
e1b7e11b
...
...
@@ -12,7 +12,7 @@ module Gitlab
def
initialize
(
project
,
dry_run:
true
,
logger:
nil
,
limit:
nil
)
@project
=
project
@dry_run
=
dry_run
@logger
=
logger
||
Rails
.
logger
# rubocop:disable Gitlab/Rails
Logger
@logger
=
logger
||
Gitlab
::
App
Logger
@limit
=
limit
end
...
...
lib/gitlab/cleanup/project_upload_file_finder.rb
View file @
e1b7e11b
...
...
@@ -49,7 +49,7 @@ module Gitlab
cmd
=
%W[
#{
ionice
}
-c Idle]
+
cmd
if
ionice
log_msg
=
"find command:
\"
#{
cmd
.
join
(
' '
)
}
\"
"
Rails
.
logger
.
info
log_msg
# rubocop:disable Gitlab/RailsLogger
Gitlab
::
AppLogger
.
info
log_msg
cmd
end
...
...
lib/gitlab/cleanup/project_uploads.rb
View file @
e1b7e11b
...
...
@@ -8,7 +8,7 @@ module Gitlab
attr_reader
:logger
def
initialize
(
logger:
nil
)
@logger
=
logger
||
Rails
.
logger
# rubocop:disable Gitlab/Rails
Logger
@logger
=
logger
||
Gitlab
::
App
Logger
end
def
run!
(
dry_run:
true
)
...
...
lib/gitlab/cleanup/remote_uploads.rb
View file @
e1b7e11b
...
...
@@ -7,7 +7,7 @@ module Gitlab
BATCH_SIZE
=
100
def
initialize
(
logger:
nil
)
@logger
=
logger
||
Rails
.
logger
# rubocop:disable Gitlab/Rails
Logger
@logger
=
logger
||
Gitlab
::
App
Logger
end
def
run!
(
dry_run:
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