Skip to content

Commit

Permalink
feat(Timestamper): Adding support for Timestamper
Browse files Browse the repository at this point in the history
  • Loading branch information
hypery2k committed Sep 7, 2024
1 parent f9562d8 commit 314d4d7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 4 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,10 @@
<artifactId>mailer</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>timestamper</artifactId>
</dependency>

</dependencies>

Expand Down
5 changes: 3 additions & 2 deletions src/main/java/hudson/plugins/logparser/LogParserParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import hudson.model.AbstractBuild;
import hudson.model.Run;
import hudson.remoting.VirtualChannel;
import hudson.plugins.timestamper.api.TimestamperAPI;

import java.io.InputStreamReader;
import java.io.BufferedReader;
Expand Down Expand Up @@ -350,8 +351,8 @@ private void parseLogBody(final Run<?, ?> build, final BufferedWriter writer, fi

// Read log file from start - line by line and apply the statuses as
// found by the threads.
try (InputStreamReader streamReader = new InputStreamReader(build.getLogInputStream(), charset);
BufferedReader reader = new BufferedReader(streamReader)) {
String query = "time=yyyy-MM-dd HH:MM:ss.SSS&appendLog";
try (BufferedReader reader = TimestamperAPI.get().read(build, query)) {
String line;
String status;
int line_num = 0;
Expand Down

0 comments on commit 314d4d7

Please sign in to comment.