Class: ActiveStorage::LogSubscriber
Do not use. This class is for internal use only.
| Relationships & Source Files | |
| Super Chains via Extension / Inclusion / Inheritance | |
|
Class Chain:
|
|
|
Instance Chain:
|
|
| Inherits: |
ActiveSupport::EventReporter::LogSubscriber
|
| Defined in: | activestorage/lib/active_storage/log_subscriber.rb |
Constant Summary
::ActiveSupport::ColorizeLogging - Included
BLACK, BLUE, CYAN, GREEN, MAGENTA, MODES, RED, WHITE, YELLOW
::ActiveSupport::EventReporter::LogSubscriber - Inherited
Class Attribute Summary
::ActiveSupport::EventReporter::LogSubscriber - Inherited
Class Method Summary
::ActiveSupport::EventReporter::LogSubscriber - Inherited
Instance Attribute Summary
Instance Method Summary
- #preview(event)
- #service_delete(event)
- #service_delete_prefixed(event)
- #service_download(event)
- #service_exist(event)
- #service_mirror(event)
- #service_streaming_download(event)
- #service_upload(event)
- #service_url(event)
- #debug(event, colored_message) private
- #info(event, colored_message) private
- #key_in(event) private
- #log_prefix_for_service(event) private
::ActiveSupport::EventReporter::LogSubscriber - Inherited
::ActiveSupport::ColorizeLogging - Included
| #color | Set color by using a symbol or one of the defined constants. |
| #colorize_logging, #debug, #error, #fatal, #info, #mode_from, #unknown, #warn | |
Class Method Details
.default_logger
[ GitHub ]# File 'activestorage/lib/active_storage/log_subscriber.rb', line 58
def self.default_logger ActiveStorage.logger end
Instance Method Details
#debug(event, colored_message) (private)
[ GitHub ]# File 'activestorage/lib/active_storage/log_subscriber.rb', line 67
def debug(event, ) super log_prefix_for_service(event) + end
#info(event, colored_message) (private)
[ GitHub ]# File 'activestorage/lib/active_storage/log_subscriber.rb', line 63
def info(event, ) super log_prefix_for_service(event) + end
#key_in(event) (private)
[ GitHub ]# File 'activestorage/lib/active_storage/log_subscriber.rb', line 75
def key_in(event) event[:payload][:key] end
#log_prefix_for_service(event) (private)
[ GitHub ]# File 'activestorage/lib/active_storage/log_subscriber.rb', line 71
def log_prefix_for_service(event) color " #{event[:payload][:service]} Storage (#{event[:payload][:duration_ms].round(1)}ms) ", CYAN end