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
0
Merge Requests
0
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
Léo-Paul Géneau
gitlab-ce
Commits
e62a6cca
Commit
e62a6cca
authored
6 years ago
by
Andrew Newdigate
Committed by
Stan Hu
6 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix for open-ended parameter's in lograge causing elastic memory issues
parent
ff2f57da
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
config/initializers/lograge.rb
config/initializers/lograge.rb
+6
-1
No files found.
config/initializers/lograge.rb
View file @
e62a6cca
...
...
@@ -12,9 +12,14 @@ unless Sidekiq.server?
config
.
lograge
.
logger
=
ActiveSupport
::
Logger
.
new
(
filename
)
# Add request parameters to log output
config
.
lograge
.
custom_options
=
lambda
do
|
event
|
params
=
event
.
payload
[
:params
]
.
except
(
*
%w(controller action format)
)
.
each_pair
.
map
{
|
k
,
v
|
{
key:
k
,
value:
v
}
}
payload
=
{
time:
event
.
time
.
utc
.
iso8601
(
3
),
params:
event
.
payload
[
:params
].
except
(
*
%w(controller action format)
)
,
params:
params
,
remote_ip:
event
.
payload
[
:remote_ip
],
user_id:
event
.
payload
[
:user_id
],
username:
event
.
payload
[
:username
]
...
...
This diff is collapsed.
Click to expand it.
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