サービス基盤におけるRuby~JSOX編~ / speee_pepabo_ruby

C84357a21083c81c5ccd5550422abc8d?s=47 Ryo Takaishi
January 18, 2017

サービス基盤におけるRuby~JSOX編~ / speee_pepabo_ruby

C84357a21083c81c5ccd5550422abc8d?s=128

Ryo Takaishi

January 18, 2017
Tweet

Transcript

  1. 4.
  2. 8.

    ͳͥ΍ͬͨͷ͔ w +409ͷ؂ࠪͰඞཁʹͳͬͨ w +409  w ࣾ಺ΛͪΌΜͱίϯτϩʔϧ͠·͠ΐ͏ɺͱ͍͏͜ͱ ࡶ 

    w ͨͱ͑͹ʜ w ݖݶΛ࣋ͭϢʔβͷΈγεςϜʹΞΫηεͰ͖Δ͔ʁ w γεςϜมߋͷཤྺ͕؅ཧ͞Ε͍ͯΔ͔ʁ
  3. 16.
  4. 28.

    "DUJWF4VQQPSU-PHHFSCSPBEDBTU w ϩάΛෳ਺ͷ-PHHFSʹૹΔͨΊͷϝιου w ྫʣඪ४ग़ྗ ϑΝΠϧ w ྫʣϑΝΠϧ ϑΝΠϧ new_logger

    = ActiveSupport::Logger.new(logdev) multiple_loggers = ActiveSupport::Logger.broadcast(new_logger) @logger.extend(multiple_loggers)
  5. 29.
  6. 30.

    .VMUJ*0 w ෳ਺ͷ*0ʹର͠ॲཧΛߦ͏ͨΊͷΫϥε w TUEPVUDMBTT*0 w ྫʣ45%065 ϑΝΠϧ class MultiIO

    # @param [Array<IO>] io_list def initialize(io_list) @io_list = io_list end [snip] def write(str) @io_list.each do |io| io.write(str) io.flush end end [snip] end
  7. 32.

    ϩάΛ4MBDLʹఴ෇͢Δ w "1*Λ࢖ͬͯ4MBDLʹϑΝΠϧΛఴ෇Ͱ͖Δ pMFTVQMPBE  w XSBQQFSMJCSBSZΛ࢖༻ MJOZPXTCSFBDBO def send_log_slack(task,

    tmplog) Breacan.access_token = '#{SLACK_ACCESS_TOKEN}' arg = { channels: ENV['RAKE_NOTIFY_TO'] || '#minne_dev', file: Faraday::UploadIO.new(tmplog.path, 'text/plain'), filename: "#{File.basename(task.name)}_#{Time.now.strftime('%Y%m%d%H%M%S')}.log" } Breacan.files_upload(arg) end
  8. 35.