Module: Hooks::Log

Defined in:
lib/hooks/core/log.rb

Overview

Global logger accessor module

Provides a singleton-like access pattern for the application logger. The logger instance is set during application initialization and can be accessed throughout the application lifecycle.

Examples:

Setting the logger instance

Hooks::Log.instance = Logger.new(STDOUT)

Accessing the logger

Hooks::Log.instance.info("Application started")

Class Attribute Summary collapse

Class Attribute Details

.instanceLogger

Get or set the global logger instance

Returns:

  • (Logger)

    The global logger instance



21
22
23
# File 'lib/hooks/core/log.rb', line 21

def instance
  @instance
end