function configureLoggers(obj)
% configureLoggers

%   Copyright 2019-2020 The MathWorks, Inc.

    % We will use set_param to configure the loggers for the model loaded
    % either on host MATLAB or on the parallel workers since
    % LoggingSpecification specified with SimulationInput overrides the
    % existing logging settings
    numSigs = length(obj.sigInfo);
    for idx=1:numSigs
        currentBlk = obj.sigInfo(idx).BlockPath.getBlock(1);
        currentPortIdx = obj.sigInfo(idx).OutputPortIndex;
        currentPort = get_param(currentBlk, 'PortHandles').Outport(currentPortIdx);
        set_param(currentPort,'DataLogging','on');
        set_param(currentPort,'DataLoggingNameMode','Custom');

        % Set a meaningful name for the signal
        signalName = get_param(currentPort,'Name');
        if isempty(signalName)
            signalName = sprintf('%s%d',obj.SignalLoggerPrefix,idx);
        end

        set_param(currentPort,'DataLoggingName',signalName);  
        set_param(currentPort,'DataLoggingDecimateData','off');
        set_param(currentPort,'DataLoggingLimitDataPoints','off');
    end
end