Skip to content

Commit b5e053d

Browse files
author
Łukasz Gąsior
authored
Merge pull request #444 from input-output-hk/feature/vm_logging
Add vm log
2 parents 36c0368 + 31cc24a commit b5e053d

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/main/scala/io/iohk/ethereum/nodebuilder/VmSetup.scala

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,17 @@ import java.lang.ProcessBuilder.Redirect
55
import akka.actor.ActorSystem
66
import io.iohk.ethereum.extvm.{ExtVMInterface, VmServerApp}
77
import io.iohk.ethereum.ledger.Ledger.VMImpl
8-
import io.iohk.ethereum.utils.{BlockchainConfig, VmConfig}
8+
import io.iohk.ethereum.utils.{BlockchainConfig, Logger, VmConfig}
99
import io.iohk.ethereum.utils.VmConfig.ExternalConfig
1010

11-
object VmSetup {
11+
object VmSetup extends Logger {
1212

1313
import VmConfig.VmMode._
1414

1515
def vm(vmConfig: VmConfig, blockchainConfig: BlockchainConfig, testMode: Boolean)(implicit actorSystem: ActorSystem): VMImpl =
1616
(vmConfig.mode, vmConfig.externalConfig) match {
1717
case (Internal, _) =>
18+
log.info("Using Mantis internal VM")
1819
new VMImpl
1920

2021
case (External, Some(extConf)) =>
@@ -28,12 +29,15 @@ object VmSetup {
2829
private def startExternalVm(externalConfig: ExternalConfig): Unit = {
2930
externalConfig.vmType match {
3031
case "iele" | "kevm" =>
32+
log.info(s"Starting external ${externalConfig.vmType} VM process using executable path")
3133
startStandardVmProcess(externalConfig)
3234

3335
case "mantis" =>
36+
log.info("Starting external Mantis VM process using executable path")
3437
startMantisVmProcess(externalConfig)
3538

3639
case "none" =>
40+
log.info("Using external VM process not managed by Mantis")
3741
// expect the vm to be started by external means
3842
}
3943
}

0 commit comments

Comments
 (0)