Class: ActiveStorage::LogSubscriber
Relationships & Source Files | |
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
|
|
Instance Chain:
|
|
Inherits: |
ActiveSupport::LogSubscriber
|
Defined in: | activestorage/lib/active_storage/log_subscriber.rb |
Constant Summary
::ActiveSupport::LogSubscriber
- Inherited
BLACK, BLUE, CYAN, GREEN, LEVEL_CHECKS, MAGENTA, MODES, RED, WHITE, YELLOW
Class Attribute Summary
::ActiveSupport::LogSubscriber
- Inherited
::ActiveSupport::Subscriber
- Inherited
Class Method Summary
::ActiveSupport::LogSubscriber
- Inherited
.attach_to, | |
.flush_all! | Flush all log_subscribers’ logger. |
.log_subscribers, .new, .fetch_public_methods, .set_event_levels, .subscribe_log_level |
::ActiveSupport::Subscriber
- Inherited
.attach_to | Attach the subscriber to a namespace. |
.detach_from | Detach the subscriber from a namespace. |
.method_added | Adds event subscribers for all new methods added to the class. |
.new, .subscribers, .add_event_subscriber, .fetch_public_methods, .find_attached_subscriber, .invalid_event?, .pattern_subscribed?, .prepare_pattern, .remove_event_subscriber |
Instance Attribute Summary
::ActiveSupport::LogSubscriber
- Inherited
::ActiveSupport::Subscriber
- Inherited
Instance Method Summary
- #logger
- #preview(event)
- #service_delete(event)
- #service_delete_prefixed(event)
- #service_download(event) (also: #service_streaming_download)
- #service_exist(event)
- #service_mirror(event)
-
#service_streaming_download(event)
Alias for #service_download.
- #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::LogSubscriber
- Inherited
#call, #logger, #publish_event, #silenced?, | |
#color | Set color by using a symbol or one of the defined constants. |
#log_exception, #mode_from |
::ActiveSupport::Subscriber
- Inherited
Constructor Details
This class inherits a constructor from ActiveSupport::LogSubscriber
Instance Method Details
#debug(event, colored_message) (private)
[ GitHub ]# File 'activestorage/lib/active_storage/log_subscriber.rb', line 62
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 58
def info(event, ) super log_prefix_for_service(event) + end
#key_in(event) (private)
[ GitHub ]# File 'activestorage/lib/active_storage/log_subscriber.rb', line 70
def key_in(event) event.payload[:key] end
#log_prefix_for_service(event) (private)
[ GitHub ]# File 'activestorage/lib/active_storage/log_subscriber.rb', line 66
def log_prefix_for_service(event) color " #{event.payload[:service]} Storage (#{event.duration.round(1)}ms) ", CYAN end
#logger
[ GitHub ]# File 'activestorage/lib/active_storage/log_subscriber.rb', line 53
def logger ActiveStorage.logger end
#preview(event)
[ GitHub ]#service_delete(event)
[ GitHub ]#service_delete_prefixed(event)
[ GitHub ]#service_download(event) Also known as: #service_streaming_download
[ GitHub ]#service_exist(event)
[ GitHub ]#service_mirror(event)
[ GitHub ]#service_streaming_download(event)
Alias for #service_download.
# File 'activestorage/lib/active_storage/log_subscriber.rb', line 19
alias_method :service_streaming_download, :service_download