-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* More logging and also logging more to build log. * Adding optional path prefix, to adjust to reported file names. * Getting workspace from build instead of WORKSPACE variable. Variable may not be correct for parallell builds.
- Loading branch information
1 parent
deaa65b
commit acc6801
Showing
18 changed files
with
270 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/bin/sh | ||
cd plugin | ||
mvnDebug -q hpi:run | ||
mvnDebug -q hpi:run -Djava.util.logging.config.file=../logging.properties | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Logging | ||
handlers = java.util.logging.ConsoleHandler | ||
org.jenkinsci.plugins.jvcts.level = FINE | ||
|
||
# Console Logging | ||
java.util.logging.ConsoleHandler.level = FINE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
plugin/src/main/java/org/jenkinsci/plugins/jvcts/JvctsLogger.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package org.jenkinsci.plugins.jvcts; | ||
|
||
import hudson.model.BuildListener; | ||
|
||
import java.util.logging.Level; | ||
import java.util.logging.Logger; | ||
|
||
public class JvctsLogger { | ||
private static Logger logger = Logger.getLogger(JvctsLogger.class.getName()); | ||
|
||
private JvctsLogger() { | ||
} | ||
|
||
public static void doLog(BuildListener listener, Level level, String string, Throwable t) { | ||
listener.getLogger().println(string); | ||
doLog(level, string, t); | ||
} | ||
|
||
public static void doLog(Level level, String string, Throwable t) { | ||
logger.log(level, string, t); | ||
} | ||
|
||
public static void doLog(BuildListener listener, Level level, String string) { | ||
doLog(listener, level, string, null); | ||
} | ||
|
||
public static void doLog(Level level, String string) { | ||
doLog(level, string, null); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.