Sha256: 5b5a915ba5511007b1f6cd206c91de285357fdc4b0f021a0d37faef5fab60b70

Contents?: true

Size: 1.03 KB

Versions: 24

Compression:

Stored size: 1.03 KB

Contents

module App1
  class ProcessConfig
    include Tengine::Support::Config::Definition
    field :daemon, "process works on background.", :type => :boolean
    field :pid_dir, "path/to/dir for PID created.", :type => :directory
  end

  class LoggerConfig < Tengine::Support::Config::Logger
    parameter :logger_name
    depends :process_config
    depends :log_common
    field :output,
      :default => proc{
        process_config.daemon ?
        "./log/#{logger_name}.log" : "STDOUT" },
      :default_description => proc{"if daemon process then \"./log/#{logger_name}.log\" else \"STDOUT\""}
    field :rotation,
      :default => proc{ log_common.rotation },
      :default_description => proc{"value of #{log_common.long_opt}-rotation"}
    field :rotation_size,
      :default => proc{ log_common.rotation_size },
      :default_description => proc{"value of #{log_common.long_opt}-rotation-size"}
    field :level,
      :default => proc{ log_common.level },
      :default_description => proc{"value of #{log_common.long_opt}-level"}
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
tengine_support-0.3.27 spec/support/app1.rb
tengine_support-0.3.26 spec/support/app1.rb
tengine_support-0.3.25 spec/support/app1.rb
tengine_support-0.3.24 spec/support/app1.rb
tengine_support-0.3.22 spec/support/app1.rb
tengine_support-0.3.21 spec/support/app1.rb
tengine_support-0.3.20 spec/support/app1.rb
tengine_support-0.3.19 spec/support/app1.rb
tengine_support-0.3.18 spec/support/app1.rb
tengine_support-0.3.17 spec/support/app1.rb
tengine_support-0.3.16 spec/support/app1.rb
tengine_support-0.3.15 spec/support/app1.rb
tengine_support-0.3.14 spec/support/app1.rb
tengine_support-0.3.13 spec/support/app1.rb
tengine_support-0.3.12 spec/support/app1.rb
tengine_support-0.3.11 spec/support/app1.rb
tengine_support-0.3.10 spec/support/app1.rb
tengine_support-0.3.9 spec/support/app1.rb
tengine_support-0.3.8 spec/support/app1.rb
tengine_support-0.3.7 spec/support/app1.rb