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
871eba78
Commit
871eba78
authored
Aug 09, 2019
by
Ash McKenzie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Geo: Allow Geo log cursor to log output to stdout
parent
dc220a3d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
0 deletions
+19
-0
ee/bin/geo_log_cursor
ee/bin/geo_log_cursor
+14
-0
ee/changelogs/unreleased/13413-geo-allow-the-log-cursor-to-log-to-stdout.yml
...eased/13413-geo-allow-the-log-cursor-to-log-to-stdout.yml
+5
-0
No files found.
ee/bin/geo_log_cursor
View file @
871eba78
...
...
@@ -19,6 +19,7 @@ class GeoLogCursorOptionParser
op
.
separator
'Usage: ./geo_log_cursor [options]'
op
.
separator
''
op
.
on
(
'-d'
,
'--debug'
,
'Enable detailed logging with extra debug information'
)
{
options
[
:debug
]
=
true
}
op
.
on
(
'--stdout-logging'
,
'Log output to stdout'
)
{
options
[
:stdout_logging
]
=
true
}
op
.
separator
'Common options:'
op
.
on
(
'-h'
,
'--help'
)
do
...
...
@@ -40,11 +41,24 @@ class GeoLogCursorOptionParser
end
end
module
StdoutLogger
def
full_log_path
STDOUT
end
end
if
$0
==
__FILE__
options
=
GeoLogCursorOptionParser
.
parse
(
ARGV
)
# We load rails environment / initializers only here to get faster command line startup when `--help` and `--version`
require
rails_path
(
'config/environment.rb'
)
if
options
[
:stdout_logging
]
# Monkey patch the logging class because multiple places use it (that
# contain mostly class methods) and is not possible to pass
# options[:stdout_logging] around without a refactor.
Gitlab
::
Geo
::
Logger
.
extend
(
StdoutLogger
)
end
Gitlab
::
Geo
::
LogCursor
::
Daemon
.
new
(
options
).
run!
end
ee/changelogs/unreleased/13413-geo-allow-the-log-cursor-to-log-to-stdout.yml
0 → 100644
View file @
871eba78
---
title
:
"
Geo:
Don't
wait
when
exiting
the
log
cursor"
merge_request
:
15070
author
:
type
:
performance
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