Class: Ridoku::Log

Inherits:
Base
  • Object
show all
Defined in:
lib/ridoku/log.rb

Constant Summary

Constants inherited from Base

Base::POSTGRES_GROUP_NAME

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

base_command, color_code_logs, configure_ec2_client, configure_iam_client, configure_instance_roles, configure_opsworks_client, configure_roles, configure_service_roles, create_app, create_role, deploy, execute_recipes, extract_instance_ids, fetch_account, fetch_app, fetch_instance, fetch_layer, fetch_permissions, fetch_roles, fetch_stack, get_instances_for_layer, get_layer_ids, if_debug?, initialize_app_environment, instance_by_id, instance_role_configured?, load_config, monitor_deployment, postgresql_group_exists?, pretty_instances, roles_configured?, rollback, run_command, save_app, save_config, save_layer, save_stack, select_instances, service_role_configured?, standard_deploy, update_cookbooks, update_pg_security_group, update_pg_security_groups_in_all_regions, valid_instances?

Instance Attribute Details

#environmentObject

Returns the value of attribute environment.



11
12
13
# File 'lib/ridoku/log.rb', line 11

def environment
  @environment
end

Instance Method Details

#runObject



13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/ridoku/log.rb', line 13

def run      
  command = Base.config[:command]
  sub_command = (command.length > 0 && command[1]) || nil

  case sub_command
  when 'unicorn', nil
    unicorn_log
  when 'nginx'
    nginx_log
  when 'all'
    all_logs
  else
    print_log_help
  end
end