code: private static OutputStreamAppender<ILoggingEvent> createAppender(LoggerContext context, Filter<ILoggingEvent> filter, LoggerOutput logOutput, String patternProperty, String name) {
      final PatternLayoutEncoder patternLayoutEncoder = createPatternLayoutEncoder(context, patternProperty);
      final OutputStreamAppender<ILoggingEvent> appender;
      if (logOutput.isConsole()) {
        appender = new OutputStreamAppender<>();
        appender.setContext(context);
        appender.setEncoder(patternLayoutEncoder);
        appender.setOutputStream(logOutput.getPrintStream());
        appender.setName(name);
        appender.addFilter(filter);
        appender.start();
      } else {
        RollingFileAppender<ILoggingEvent> rAppender = new RollingFileAppender<>();
        rAppender.setContext(context);
        rAppender.setEncoder(patternLayoutEncoder);
        rAppender.setFile(logOutput.getOutputName()+"."+logOutput.getOutputType());
        rAppender.setName(name);
        rAppender.addFilter(filter);
  
        final FixedWindowRollingPolicy rollingPolicy = new FixedWindowRollingPolicy();
        rollingPolicy.setContext(context);
        rollingPolicy.setParent(rAppender);
        rollingPolicy.setFileNamePattern(logOutput.getOutputName()+"%i"+"."+logOutput.getOutputType());
        rollingPolicy.setMinIndex(1);
        rollingPolicy.setMaxIndex(logOutput.getFileCount());
        rollingPolicy.start();
  
        final SizeBasedTriggeringPolicy<ILoggingEvent> triggeringPolicy = new SizeBasedTriggeringPolicy<>();
        triggeringPolicy.setContext(context);
        triggeringPolicy.setMaxFileSize(logOutput.getFileLimit());
        triggeringPolicy.start();
  
        rAppender.setRollingPolicy(rollingPolicy);
        rAppender.setTriggeringPolicy(triggeringPolicy);
        rAppender.start();
  
        appender = rAppender;
      }
      return appender;
    }
docs: Creates an {@link OutputStreamAppender} for the required filter, pattern and logger output.
  
  @param context Logger context to associate the appender with.
  @param filter Event log filter.
  @param logOutput Logger output information for the destination to write logger events to.
  @param patternProperty Logger context property that defines the pattern for formatting logger event output.
  @param name The name of the appender.
  @return An {@link OutputStreamAppender} for the required parameters.