Sets the logging backtrace location. When a backtrace location is set and a log message is emitted at that location, the stack of the goroutine executing the log statement will be printed to stderr.
Sets the output target of vmlog precompiled contract. When the output target is a file, logs from vmlog calls in smart contracts will be written to DATADIR/log/vm.log. Here DATADIR is the directory specified by --datadir when launching klay. On the other hand, the output target is stdout, logs will be displayed like a debug message on the standard output.
> debug.setVMLogTarget(0)
"no output"
> debug.setVMLogTarget(1)
"file"
> debug.setVMLogTarget(2)
"stdout"
> debug.setVMLogTarget(3)
"both file and stdout"
> debug.setVMLogTarget(4)
Error: target should be between 0 and 3
at web3.js:3239:20
at web3.js:6447:15
at web3.js:5181:36
at <anonymous>:1:1