All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.rollbar.notifier.truncation.StringsStrategy Maven / Gradle / Ivy

Go to download

For connecting your applications built on the JVM to Rollbar for Error Reporting

The newest version!
package com.rollbar.notifier.truncation;

import com.rollbar.api.payload.Payload;

class StringsStrategy implements TruncationStrategy {
  private final int stringLength;

  public StringsStrategy(int stringLength) {
    this.stringLength = stringLength;
  }

  @Override
  public TruncationResult truncate(Payload payload) {
    if (payload == null || payload.getData() == null) {
      return TruncationResult.none();
    }

    return TruncationResult.truncated(payload.truncateStrings(stringLength));
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy