Module: BbDeploy::Logger
- Included in:
- Deployer
- Defined in:
- lib/bb_deploy/logger.rb
Overview
Helper file for Logging/Slack notifications
Defined Under Namespace
Modules: ConsolidatedLogger
Class Method Summary
collapse
Instance Method Summary
collapse
Class Method Details
.logger(phase) ⇒ Object
6
7
8
|
# File 'lib/bb_deploy/logger.rb', line 6
def self.logger(phase)
@logger ||= ConsolidatedLogger::Logentries.new(phase)
end
|
Instance Method Details
#chat_broadcast(msg, phase:, notify_eng_hub: false) ⇒ Object
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
# File 'lib/bb_deploy/logger.rb', line 47
def chat_broadcast(msg, phase:, notify_eng_hub: false)
attachment = [
{
fallback: "Deploying to #{phase}",
color: "good",
fields: [
{
title: "Details",
value: msg.gsub("(successful)", ":rocket:"),
short: false
}
]
}
]
puts "[ *Deploying to #{phase}* ]"
end
|
#slack ⇒ Object
70
71
72
|
# File 'lib/bb_deploy/logger.rb', line 70
def slack
@slack ||= Slack::Notifier.new(BbDeploy::Config.slack_webhook_key)
end
|