mirror of
https://github.com/enso-org/enso.git
synced 2024-12-23 11:41:56 +03:00
Log project manager version on startup (#7646)
Looks like that
```
[info] [2023-08-23T13:12:58.119Z] [org.enso.projectmanager.boot.ProjectManager$] Starting Enso Project Manager
Version: 0.0.0-dev
Built with: scala-2.13.11 for GraalVM 17.0.7
Built from: wip/db/fix-dev-version-check* @ 52bc6b8fcf
Built on: Linux (amd64)
```
This commit is contained in:
parent
7d83b3d7b4
commit
c80b8624a8
@ -24,6 +24,7 @@ import zio.{ExitCode, Runtime, Scope, UIO, ZAny, ZIO, ZIOAppArgs, ZIOAppDefault}
|
||||
import java.io.{EOFException, IOException}
|
||||
import java.nio.file.{FileAlreadyExistsException, Files, Path, Paths}
|
||||
import java.util.concurrent.ScheduledThreadPoolExecutor
|
||||
|
||||
import scala.concurrent.duration._
|
||||
import scala.concurrent.{Await, ExecutionContext, ExecutionContextExecutor}
|
||||
|
||||
@ -228,7 +229,10 @@ object ProjectManager extends ZIOAppDefault with LazyLogging {
|
||||
} else {
|
||||
val verbosity = options.getOptions.count(_ == Cli.option.verbose)
|
||||
val logMasking = !options.hasOption(Cli.NO_LOG_MASKING)
|
||||
logger.info("Starting Project Manager...")
|
||||
logger.info(
|
||||
"Starting {}",
|
||||
makeVersionDescription.asString(useJson = false)
|
||||
)
|
||||
for {
|
||||
opts <- parseOpts(options)
|
||||
profilingLog = opts.profilingPath.map(getSiblingFile(_, ".log"))
|
||||
@ -278,14 +282,16 @@ object ProjectManager extends ZIOAppDefault with LazyLogging {
|
||||
private def displayVersion(
|
||||
useJson: Boolean
|
||||
): ZIO[ZAny, IOException, ExitCode] = {
|
||||
val versionDescription = VersionDescription.make(
|
||||
printLine(makeVersionDescription.asString(useJson)) *>
|
||||
ZIO.succeed(SuccessExitCode)
|
||||
}
|
||||
|
||||
private def makeVersionDescription: VersionDescription =
|
||||
VersionDescription.make(
|
||||
"Enso Project Manager",
|
||||
includeRuntimeJVMInfo = false,
|
||||
enableNativeImageOSWorkaround = true
|
||||
)
|
||||
printLine(versionDescription.asString(useJson)) *>
|
||||
ZIO.succeed(SuccessExitCode)
|
||||
}
|
||||
|
||||
private def logServerStartup(): UIO[Unit] =
|
||||
ZIO.succeed {
|
||||
|
@ -115,7 +115,7 @@ object VersionDescription {
|
||||
| "ref": "${Info.ref}",
|
||||
| "dirty": ${Info.isDirty},
|
||||
| "commit": "${Info.commit}",
|
||||
| $runtimeDescription$parameters
|
||||
|$runtimeDescription$parameters
|
||||
|}""".stripMargin
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user