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
53825fd9
Commit
53825fd9
authored
Sep 09, 2020
by
Rajendra Kadam
Committed by
Peter Leitzen
Sep 09, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use applogger in config/*
parent
65e7b302
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
11 additions
and
6 deletions
+11
-6
changelogs/unreleased/app-logger-2.yml
changelogs/unreleased/app-logger-2.yml
+5
-0
config/initializers/7_prometheus_metrics.rb
config/initializers/7_prometheus_metrics.rb
+1
-1
config/initializers/active_record_lifecycle.rb
config/initializers/active_record_lifecycle.rb
+2
-2
config/initializers/deprecations.rb
config/initializers/deprecations.rb
+1
-1
config/initializers/forbid_sidekiq_in_transactions.rb
config/initializers/forbid_sidekiq_in_transactions.rb
+1
-1
config/initializers/sidekiq.rb
config/initializers/sidekiq.rb
+1
-1
No files found.
changelogs/unreleased/app-logger-2.yml
0 → 100644
View file @
53825fd9
---
title
:
Use applogger in config/initializers/*
merge_request
:
41047
author
:
Rajendra Kadam
type
:
other
config/initializers/7_prometheus_metrics.rb
View file @
53825fd9
...
...
@@ -16,7 +16,7 @@ def prometheus_default_multiproc_dir
end
Prometheus
::
Client
.
configure
do
|
config
|
config
.
logger
=
Rails
.
logger
# rubocop:disable Gitlab/Rails
Logger
config
.
logger
=
Gitlab
::
App
Logger
config
.
initial_mmap_file_size
=
4
*
1024
...
...
config/initializers/active_record_lifecycle.rb
View file @
53825fd9
...
...
@@ -7,7 +7,7 @@ if defined?(ActiveRecord::Base) && !Gitlab::Runtime.sidekiq?
ActiveSupport
.
on_load
(
:active_record
)
do
ActiveRecord
::
Base
.
establish_connection
Rails
.
logger
.
debug
(
"ActiveRecord connection established"
)
# rubocop:disable Gitlab/RailsLogger
Gitlab
::
AppLogger
.
debug
(
"ActiveRecord connection established"
)
end
end
end
...
...
@@ -20,6 +20,6 @@ if defined?(ActiveRecord::Base)
# as there's no need for the master process to hold a connection
ActiveRecord
::
Base
.
connection
.
disconnect!
Rails
.
logger
.
debug
(
"ActiveRecord connection disconnected"
)
# rubocop:disable Gitlab/RailsLogger
Gitlab
::
AppLogger
.
debug
(
"ActiveRecord connection disconnected"
)
end
end
config/initializers/deprecations.rb
View file @
53825fd9
...
...
@@ -2,7 +2,7 @@ if Rails.env.development? || ENV['GITLAB_LEGACY_PATH_LOG_MESSAGE']
deprecator
=
ActiveSupport
::
Deprecation
.
new
(
'11.0'
,
'GitLab'
)
deprecator
.
behavior
=
->
(
message
,
callstack
)
{
Rails
.
logger
.
warn
(
"
#{
message
}
:
#{
callstack
[
1
..
20
].
join
}
"
)
# rubocop:disable Gitlab/RailsLogger
Gitlab
::
AppLogger
.
warn
(
"
#{
message
}
:
#{
callstack
[
1
..
20
].
join
}
"
)
}
ActiveSupport
::
Deprecation
.
deprecate_methods
(
Gitlab
::
GitalyClient
::
StorageSettings
,
:legacy_disk_path
,
deprecator:
deprecator
)
...
...
config/initializers/forbid_sidekiq_in_transactions.rb
View file @
53825fd9
...
...
@@ -28,7 +28,7 @@ module Sidekiq
Use an `after_commit` hook, or include `AfterCommitQueue` and use a `run_after_commit` block instead.
MSG
rescue
Sidekiq
::
Worker
::
EnqueueFromTransactionError
=>
e
::
Rails
.
l
ogger
.
error
(
e
.
message
)
if
::
Rails
.
env
.
production?
Gitlab
::
AppL
ogger
.
error
(
e
.
message
)
if
::
Rails
.
env
.
production?
Gitlab
::
ErrorTracking
.
track_and_raise_for_dev_exception
(
e
)
end
end
...
...
config/initializers/sidekiq.rb
View file @
53825fd9
...
...
@@ -70,7 +70,7 @@ Sidekiq.configure_server do |config|
cron_jobs
[
k
][
'class'
]
=
cron_jobs
[
k
].
delete
(
'job_class'
)
else
cron_jobs
.
delete
(
k
)
Rails
.
logger
.
error
(
"Invalid cron_jobs config key: '
#{
k
}
'. Check your gitlab config file."
)
# rubocop:disable Gitlab/RailsLogger
Gitlab
::
AppLogger
.
error
(
"Invalid cron_jobs config key: '
#{
k
}
'. Check your gitlab config file."
)
end
end
Sidekiq
::
Cron
::
Job
.
load_from_hash!
cron_jobs
...
...
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