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
Instance Method Details
#chat_broadcast(msg, phase:, notify_eng_hub: false) ⇒ Object
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
# File 'lib/bb_deploy/logger.rb', line 44
def chat_broadcast(msg, phase:, notify_eng_hub: false)
attachment = [
{
fallback: "Deploying to #{phase}",
color: " ",
fields: [
{
title: "Details",
value: msg,
short: false
}
]
}
]
slack.ping("*Deploying to #{phase}*", attachments: attachment, channel: BbDeploy::Config.deployment_channel)
slack.ping("*Deploying to #{phase}*", attachments: attachment, channel: BbDeploy::Config.engineering_channel) if notify_eng_hub
@consolidated_logger ||= ConsolidatedLogger::Logentries.new(phase)
@consolidated_logger.logger.info("DEPLOY--#{msg}")
end
|