Method: Cnvrg::JobCli#log

Defined in:
lib/cnvrg/job_cli.rb

#log(*logs) ⇒ Object



8
9
10
11
12
13
14
15
16
# File 'lib/cnvrg/job_cli.rb', line 8

def log(*logs)
    Cnvrg::CLI.new.log_start(__method__, args, options)
    @project = Project.new(owner: ENV['CNVRG_OWNER'], slug: ENV['CNVRG_PROJECT'])
    if options['restart'] == @project.check_job_pod_restart[0] or options['step'] == "ready"
        @project.job_log(logs, level: options['level'], step: options['step'])
    else
        @project.job_log(nil, level: options['level'], step: options['step'])
    end
end