diff --git a/gems/activejob/6.0/_test/activejob.rb b/gems/activejob/6.0/_test/activejob.rb index d0521bf3..85c19243 100644 --- a/gems/activejob/6.0/_test/activejob.rb +++ b/gems/activejob/6.0/_test/activejob.rb @@ -22,4 +22,12 @@ def around_task end SendMessageJob.perform_now +SendMessageJob.logger +SendMessageJob.logger = ActiveSupport::Logger.new(STDOUT) +SendMessageJob.log_arguments = false +SendMessageJob.log_arguments +SendMessageJob.log_arguments? SendMessageJob.set(queue: :another_queue).perform_later(flag: false) +job = SendMessageJob.new(flag: false) +job.logger +job.logger = ActiveSupport::Logger.new(STDOUT) diff --git a/gems/activejob/6.0/activejob-generated.rbs b/gems/activejob/6.0/activejob-generated.rbs index c311bc8b..49b3f9ab 100644 --- a/gems/activejob/6.0/activejob-generated.rbs +++ b/gems/activejob/6.0/activejob-generated.rbs @@ -630,15 +630,6 @@ end module ActiveJob module Logging - # nodoc: - extend ActiveSupport::Concern - - private - - def tag_logger: (*untyped tags) { () -> untyped } -> untyped - - def logger_tagged_by_active_job?: () -> untyped - class LogSubscriber < ActiveSupport::LogSubscriber # nodoc: def enqueue: (untyped event) -> untyped diff --git a/gems/activejob/6.0/activejob.rbs b/gems/activejob/6.0/activejob.rbs index 16009ed1..935f2358 100644 --- a/gems/activejob/6.0/activejob.rbs +++ b/gems/activejob/6.0/activejob.rbs @@ -8,6 +8,8 @@ module ActiveJob extend ActiveJob::QueueAdapter::ClassMethods extend ActiveJob::QueueName::ClassMethods extend ActiveJob::QueuePriority::ClassMethods + extend ActiveJob::Logging::ClassMethods + include ActiveJob::Logging def self.queue_as: (*untyped) -> void | ... def self.queue_with_priority: (?untyped? priority) -> void | ... @@ -21,3 +23,27 @@ module ActiveJob def self.discard_on: (*untyped) -> void | ... end end + +module ActiveJob + module Logging + # nodoc: + extend ActiveSupport::Concern + + module ClassMethods + def logger: () -> untyped + def logger=: (untyped val) -> untyped + def log_arguments: () -> bool + def log_arguments=: (bool value) -> bool + def log_arguments?: () -> bool + end + + def logger: () -> untyped + def logger=: (untyped val) -> untyped + + private + + def tag_logger: (*Array[String] tags) { () -> untyped } -> untyped + + def logger_tagged_by_active_job?: () -> bool + end +end