Method: Roby::Application#prepare_event_log

Defined in:
lib/roby/app.rb

#prepare_event_logObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
# File 'lib/roby/app.rb', line 1180

def prepare_event_log
    require "roby/droby/event_logger"
    require "roby/droby/logfile/writer"

    logfile_path = File.join(log_dir, "#{robot_name}-events.log")
    event_io = File.open(logfile_path, "w")
    logfile = DRoby::Logfile::Writer.new(event_io, plugins: plugins.map { |n, _| n })
    plan.event_logger = DRoby::EventLogger.new(logfile, log_timepoints: log_timepoints?)
    plan.execution_engine.event_logger = plan.event_logger

    Robot.info "logs are in #{log_dir}"
    logfile_path
end