conform capitalization in logWithCommand logs

This commit is contained in:
i-norden 2022-10-10 13:44:46 -05:00
parent 8d8ff99d19
commit 54205d8787
4 changed files with 18 additions and 18 deletions

View File

@ -304,11 +304,11 @@ func getConfig(nodeInfo node.Info) (interfaces.Config, error) {
if err != nil {
return nil, err
}
logWithCommand.Infof("configuring service for database type: %s", dbType)
logWithCommand.Infof("Configuring service for database type: %s", dbType)
var indexerConfig interfaces.Config
switch dbType {
case shared.FILE:
logWithCommand.Info("starting in sql file writing mode")
logWithCommand.Info("Starting in sql file writing mode")
fileModeStr := viper.GetString("database.fileMode")
fileMode, err := file.ResolveFileMode(fileModeStr)
@ -318,12 +318,12 @@ func getConfig(nodeInfo node.Info) (interfaces.Config, error) {
filePathStr := viper.GetString("database.filePath")
if fileMode == file.SQL && filePathStr == "" {
logWithCommand.Fatal("when operating in sql file writing mode a file path must be provided")
logWithCommand.Fatal("When operating in sql file writing mode a file path must be provided")
}
fileCsvDirStr := viper.GetString("database.fileCsvDir")
if fileMode == file.CSV && fileCsvDirStr == "" {
logWithCommand.Fatal("when operating in csv file writing mode a directory path must be provided")
logWithCommand.Fatal("When operating in csv file writing mode a directory path must be provided")
}
indexerConfig = file.Config{
@ -332,7 +332,7 @@ func getConfig(nodeInfo node.Info) (interfaces.Config, error) {
FilePath: filePathStr,
}
case shared.DUMP:
logWithCommand.Info("starting in data dump mode")
logWithCommand.Info("Starting in data dump mode")
dumpDstStr := viper.GetString("database.dumpDestination")
dumpDst, err := dump.ResolveDumpType(dumpDstStr)
if err != nil {
@ -349,7 +349,7 @@ func getConfig(nodeInfo node.Info) (interfaces.Config, error) {
return nil, fmt.Errorf("unrecognized dump destination: %s", dumpDst)
}
case shared.POSTGRES:
logWithCommand.Info("starting in postgres mode")
logWithCommand.Info("Starting in postgres mode")
driverTypeStr := viper.GetString("database.driver")
driverType, err := postgres.ResolveDriverType(driverTypeStr)
if err != nil {

View File

@ -68,12 +68,12 @@ func serve() {
// report latest block info
header, err := reader.GetLatestHeader()
if err != nil {
logWithCommand.Fatalf("unable to determine latest header height and hash: %s", err.Error())
logWithCommand.Fatalf("Unable to determine latest header height and hash: %s", err.Error())
}
if header.Number == nil {
logWithCommand.Fatal("latest header found in levelDB has a nil block height")
logWithCommand.Fatal("Latest header found in levelDB has a nil block height")
}
logWithCommand.Infof("latest block found in the levelDB\r\nheight: %s, hash: %s", header.Number.String(), header.Hash().Hex())
logWithCommand.Infof("Latest block found in the levelDB\r\nheight: %s, hash: %s", header.Number.String(), header.Hash().Hex())
statediffService, err := createStateDiffService(reader, chainConf, nodeInfo)
if err != nil {
@ -94,7 +94,7 @@ func serve() {
if viper.GetBool("prerun.only") {
parallel := viper.GetBool("prerun.parallel")
if err := statediffService.Run(nil, parallel); err != nil {
logWithCommand.Fatal("unable to perform prerun: %v", err)
logWithCommand.Fatal("Unable to perform prerun: %v", err)
}
return
}
@ -124,17 +124,17 @@ func startServers(serv sd.StateDiffService) error {
ipcPath := viper.GetString("server.ipcPath")
httpPath := viper.GetString("server.httpPath")
if ipcPath == "" && httpPath == "" {
logWithCommand.Fatal("need an ipc path and/or an http path")
logWithCommand.Fatal("Need an ipc path and/or an http path")
}
if ipcPath != "" {
logWithCommand.Info("starting up IPC server")
logWithCommand.Info("Starting up IPC server")
_, _, err := srpc.StartIPCEndpoint(ipcPath, serv.APIs())
if err != nil {
return err
}
}
if httpPath != "" {
logWithCommand.Info("starting up HTTP server")
logWithCommand.Info("Starting up HTTP server")
_, err := srpc.StartHTTPEndpoint(httpPath, serv.APIs(), []string{"statediff"}, nil, []string{"*"}, rpc.HTTPTimeouts{})
if err != nil {
return err

View File

@ -45,10 +45,10 @@ func stats() {
header, err := reader.GetLatestHeader()
if err != nil {
logWithCommand.Fatalf("unable to determine latest header height and hash: %s", err.Error())
logWithCommand.Fatalf("Unable to determine latest header height and hash: %s", err.Error())
}
if header.Number == nil {
logWithCommand.Fatal("latest header found in levelDB has a nil block height")
logWithCommand.Fatal("Latest header found in levelDB has a nil block height")
}
logWithCommand.Infof("latest block found in the levelDB\r\nheight: %s, hash: %s", header.Number.String(), header.Hash().Hex())
logWithCommand.Infof("Latest block found in the levelDB\r\nheight: %s, hash: %s", header.Number.String(), header.Hash().Hex())
}

View File

@ -120,7 +120,7 @@ func instantiateLevelDBReader() (sd.Reader, *params.ChainConfig, node.Info) {
}
if err != nil {
logWithCommand.Fatalf("unable to instantiate chain config: %s", err.Error())
logWithCommand.Fatalf("Unable to instantiate chain config: %s", err.Error())
}
// create LevelDB reader
@ -140,7 +140,7 @@ func instantiateLevelDBReader() (sd.Reader, *params.ChainConfig, node.Info) {
}
reader, err := sd.NewLvlDBReader(readerConf)
if err != nil {
logWithCommand.Fatalf("unable to instantiate levelDB reader: %s", err.Error())
logWithCommand.Fatalf("Unable to instantiate levelDB reader: %s", err.Error())
}
return reader, chainConf, nodeInfo
}