Skip to content

Commit

Permalink
Increase log envelope limit to the max allowable. (#416)
Browse files Browse the repository at this point in the history
This will give users more visibility into their logs
  • Loading branch information
cppwfs committed Dec 13, 2023
1 parent 4cdb55e commit e742d62
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@
import reactor.core.publisher.Flux;

import java.time.Duration;
import java.util.Base64;
import java.util.List;
import java.util.Objects;

/**
* Provide api access to retrieve logs for applications.
Expand All @@ -41,6 +39,9 @@
* @since 2.9.3
*/
public class ApplicationLogAccessor {

private final static int MAX_LOG_LIMIT = 1000;

private final static Logger logger = LoggerFactory.getLogger(ApplicationLogAccessor.class);
private final LogCacheClient logCacheClient;

Expand All @@ -60,7 +61,7 @@ public String getLog(String deploymentId, Duration apiTimeout) {
Assert.hasText(deploymentId, "id must have text and not null");
Assert.notNull(apiTimeout, "apiTimeout must not be null");
StringBuilder stringBuilder = new StringBuilder();
ReadRequest request = ReadRequest.builder().sourceId(deploymentId).build();
ReadRequest request = ReadRequest.builder().sourceId(deploymentId).limit(MAX_LOG_LIMIT).build();
List<Log> logs = this.logCacheClient
.read(request)
.flatMapMany(this::responseToEnvelope)
Expand Down

0 comments on commit e742d62

Please sign in to comment.