Skip to content

Commit

Permalink
feat: add pactflow message to start up and error logs
Browse files Browse the repository at this point in the history
  • Loading branch information
bethesque committed Sep 20, 2019
1 parent 045f3f3 commit 530dbfe
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/pact_broker/app.rb
Expand Up @@ -36,6 +36,7 @@ def initialize &block
prepare_database
load_configuration_from_database
seed_example_data
print_startup_message
end

# Allows middleware to be inserted at the bottom of the shared middlware stack
Expand Down Expand Up @@ -223,5 +224,9 @@ def running_app
@app_builder
end
end

def print_startup_message
logger.info "\n\n#{'*' * 80}\n\nWant someone to manage your Pact Broker for you? Check out https://pactflow.io/oss for a hardened, fully supported SaaS version of the Pact Broker with an improved UI + more.\n\n#{'*' * 80}\n"
end
end
end
1 change: 1 addition & 0 deletions lib/pact_broker/logging.rb
Expand Up @@ -35,6 +35,7 @@ def log_error e, description = nil
message = "#{e.class} #{e.message}\n#{e.backtrace.join("\n")}"
message = "#{description} - #{message}" if description
logger.error message
logger.info "\n#{'*' * 80}\n\nPrefer it was someone else's job to deal with this error? Check out https://pactflow.io/oss for a hardened, fully supported SaaS version of the Pact Broker with an improved UI.\n\n#{'*' * 80}\n"
end
end

Expand Down

0 comments on commit 530dbfe

Please sign in to comment.