mirror of
https://github.com/enso-org/enso.git
synced 2024-11-27 02:55:06 +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.io.{EOFException, IOException}
|
||||||
import java.nio.file.{FileAlreadyExistsException, Files, Path, Paths}
|
import java.nio.file.{FileAlreadyExistsException, Files, Path, Paths}
|
||||||
import java.util.concurrent.ScheduledThreadPoolExecutor
|
import java.util.concurrent.ScheduledThreadPoolExecutor
|
||||||
|
|
||||||
import scala.concurrent.duration._
|
import scala.concurrent.duration._
|
||||||
import scala.concurrent.{Await, ExecutionContext, ExecutionContextExecutor}
|
import scala.concurrent.{Await, ExecutionContext, ExecutionContextExecutor}
|
||||||
|
|
||||||
@ -228,7 +229,10 @@ object ProjectManager extends ZIOAppDefault with LazyLogging {
|
|||||||
} else {
|
} else {
|
||||||
val verbosity = options.getOptions.count(_ == Cli.option.verbose)
|
val verbosity = options.getOptions.count(_ == Cli.option.verbose)
|
||||||
val logMasking = !options.hasOption(Cli.NO_LOG_MASKING)
|
val logMasking = !options.hasOption(Cli.NO_LOG_MASKING)
|
||||||
logger.info("Starting Project Manager...")
|
logger.info(
|
||||||
|
"Starting {}",
|
||||||
|
makeVersionDescription.asString(useJson = false)
|
||||||
|
)
|
||||||
for {
|
for {
|
||||||
opts <- parseOpts(options)
|
opts <- parseOpts(options)
|
||||||
profilingLog = opts.profilingPath.map(getSiblingFile(_, ".log"))
|
profilingLog = opts.profilingPath.map(getSiblingFile(_, ".log"))
|
||||||
@ -278,14 +282,16 @@ object ProjectManager extends ZIOAppDefault with LazyLogging {
|
|||||||
private def displayVersion(
|
private def displayVersion(
|
||||||
useJson: Boolean
|
useJson: Boolean
|
||||||
): ZIO[ZAny, IOException, ExitCode] = {
|
): ZIO[ZAny, IOException, ExitCode] = {
|
||||||
val versionDescription = VersionDescription.make(
|
printLine(makeVersionDescription.asString(useJson)) *>
|
||||||
|
ZIO.succeed(SuccessExitCode)
|
||||||
|
}
|
||||||
|
|
||||||
|
private def makeVersionDescription: VersionDescription =
|
||||||
|
VersionDescription.make(
|
||||||
"Enso Project Manager",
|
"Enso Project Manager",
|
||||||
includeRuntimeJVMInfo = false,
|
includeRuntimeJVMInfo = false,
|
||||||
enableNativeImageOSWorkaround = true
|
enableNativeImageOSWorkaround = true
|
||||||
)
|
)
|
||||||
printLine(versionDescription.asString(useJson)) *>
|
|
||||||
ZIO.succeed(SuccessExitCode)
|
|
||||||
}
|
|
||||||
|
|
||||||
private def logServerStartup(): UIO[Unit] =
|
private def logServerStartup(): UIO[Unit] =
|
||||||
ZIO.succeed {
|
ZIO.succeed {
|
||||||
|
@ -115,7 +115,7 @@ object VersionDescription {
|
|||||||
| "ref": "${Info.ref}",
|
| "ref": "${Info.ref}",
|
||||||
| "dirty": ${Info.isDirty},
|
| "dirty": ${Info.isDirty},
|
||||||
| "commit": "${Info.commit}",
|
| "commit": "${Info.commit}",
|
||||||
| $runtimeDescription$parameters
|
|$runtimeDescription$parameters
|
||||||
|}""".stripMargin
|
|}""".stripMargin
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user