File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed
Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,18 @@ class Base
1616 def call ( payload :, headers :, config :)
1717 raise NotImplementedError , "Handler must implement #call method"
1818 end
19+
20+ # Short logger accessor for all subclasses
21+ # @return [Hooks::Log] Logger instance
22+ #
23+ # Provides a convenient way for handlers to log messages without needing
24+ # to reference the full Hooks::Log namespace.
25+ #
26+ # @example Logging an error in an inherited class
27+ # log.error("oh no an error occured")
28+ def log
29+ Hooks ::Log . instance
30+ end
1931 end
2032 end
2133end
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ class GithubHandler < Hooks::Handlers::Base
99 # @param config [Hash] Endpoint configuration
1010 # @return [Hash] Response data
1111 def call ( payload :, headers :, config :)
12+ log . info ( "🚀 Processing GitHub webhook 🚀" )
1213 return {
1314 status : "success"
1415 }
You can’t perform that action at this time.
0 commit comments