Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
INK
ink-api
Commits
b1f937a2
Commit
b1f937a2
authored
Jan 23, 2018
by
Aanand Prasad
Browse files
Rails logs to stdout
parent
4c58c0bc
Pipeline
#4070
passed with stages
in 5 minutes and 22 seconds
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
.env.sample
View file @
b1f937a2
...
...
@@ -26,5 +26,6 @@ INK_EMAIL=admin@admin.com
INK_PASSWORD=abc12345
INK_AUTH=abc12345
RAILS_ENV=development
RAILS_LOG_TO_STDOUT=1
DISABLE_DATABASE_ENVIRONMENT_CHECK=1
config/environments/demo.rb
View file @
b1f937a2
...
...
@@ -79,6 +79,7 @@ Rails.application.configure do
# config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name')
if
ENV
[
"RAILS_LOG_TO_STDOUT"
].
present?
STDOUT
.
sync
=
true
logger
=
ActiveSupport
::
Logger
.
new
(
STDOUT
)
logger
.
formatter
=
config
.
log_formatter
config
.
logger
=
ActiveSupport
::
TaggedLogging
.
new
(
logger
)
...
...
config/environments/development.rb
View file @
b1f937a2
...
...
@@ -42,6 +42,13 @@ Rails.application.configure do
# Print deprecation notices to the Rails logger.
config
.
active_support
.
deprecation
=
:log
if
ENV
[
"RAILS_LOG_TO_STDOUT"
].
present?
STDOUT
.
sync
=
true
logger
=
ActiveSupport
::
Logger
.
new
(
STDOUT
)
logger
.
formatter
=
config
.
log_formatter
config
.
logger
=
ActiveSupport
::
TaggedLogging
.
new
(
logger
)
end
# Raise an error on page load if there are pending migrations.
config
.
active_record
.
migration_error
=
:page_load
...
...
config/environments/production.rb
View file @
b1f937a2
...
...
@@ -79,6 +79,7 @@ Rails.application.configure do
# config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name')
if
ENV
[
"RAILS_LOG_TO_STDOUT"
].
present?
STDOUT
.
sync
=
true
logger
=
ActiveSupport
::
Logger
.
new
(
STDOUT
)
logger
.
formatter
=
config
.
log_formatter
config
.
logger
=
ActiveSupport
::
TaggedLogging
.
new
(
logger
)
...
...
config/environments/staging.rb
View file @
b1f937a2
...
...
@@ -79,6 +79,7 @@ Rails.application.configure do
# config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name')
if
ENV
[
"RAILS_LOG_TO_STDOUT"
].
present?
STDOUT
.
sync
=
true
logger
=
ActiveSupport
::
Logger
.
new
(
STDOUT
)
logger
.
formatter
=
config
.
log_formatter
config
.
logger
=
ActiveSupport
::
TaggedLogging
.
new
(
logger
)
...
...
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