Skip to content

Commit 530dbfe

Browse files
committed
feat: add pactflow message to start up and error logs
1 parent 045f3f3 commit 530dbfe

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

lib/pact_broker/app.rb

+5
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ def initialize &block
3636
prepare_database
3737
load_configuration_from_database
3838
seed_example_data
39+
print_startup_message
3940
end
4041

4142
# Allows middleware to be inserted at the bottom of the shared middlware stack
@@ -223,5 +224,9 @@ def running_app
223224
@app_builder
224225
end
225226
end
227+
228+
def print_startup_message
229+
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"
230+
end
226231
end
227232
end

lib/pact_broker/logging.rb

+1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ def log_error e, description = nil
3535
message = "#{e.class} #{e.message}\n#{e.backtrace.join("\n")}"
3636
message = "#{description} - #{message}" if description
3737
logger.error message
38+
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"
3839
end
3940
end
4041

0 commit comments

Comments
 (0)