-
-
Notifications
You must be signed in to change notification settings - Fork 179
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: use SemanticLogger for Padrino
- Loading branch information
Showing
4 changed files
with
26 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,9 @@ | ||
require "pact_broker/configuration" | ||
# Must be defined before loading Padrino | ||
# Stop Padrino creating a log file, as it will try to create it in the gems directory | ||
# http://www.padrinorb.com/api/Padrino/Logger.html | ||
unless defined? PADRINO_LOGGER | ||
log_path = File.join(PactBroker.configuration.log_dir, "ui.log") | ||
PADRINO_LOGGER = { | ||
production: { log_level: :error, stream: :to_file, log_path: log_path }, | ||
staging: { log_level: :error, stream: :to_file, log_path: log_path }, | ||
test: { log_level: :warn, stream: :to_file, log_path: log_path }, | ||
development: { log_level: :warn, stream: :to_file, log_path: log_path } | ||
} | ||
end | ||
# This configuration will be replaced by the SemanticLogger later on. | ||
PADRINO_LOGGER ||= { | ||
ENV.fetch("RACK_ENV", "production").to_sym => { stream: :stdout } | ||
} | ||
|
||
require "pact_broker/ui/app" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters