Skip to content

Commit

Permalink
Dump the indy handler class to location from settings
Browse files Browse the repository at this point in the history
  • Loading branch information
jbachorik committed Jul 13, 2022
1 parent e615105 commit 2832203
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Expand Up @@ -80,6 +80,10 @@ public boolean isDumpClasses() {
return settings.isDumpClasses();
}

public String getDumpClassDir() {
return settings.getDumpDir();
}

public void dumpClass(String className, byte[] code) {
if (settings.isDumpClasses()) {
try {
Expand Down
Expand Up @@ -63,7 +63,7 @@ protected String getMethodName(String name) {

if (debugSupport.isDumpClasses()) {
try {
String handlerPath = "/tmp/" + handlerClassName.replace('/', '_') + ".class";
String handlerPath = debugSupport.getDumpClassDir() + "/" + handlerClassName.replace('/', '_') + ".class";
log.debug("BTrace INDY handler dumped: {}", handlerPath);
Files.write(Paths.get(handlerPath), data, StandardOpenOption.CREATE);
} catch (IOException e) {
Expand Down

0 comments on commit 2832203

Please sign in to comment.