// startEmmyServer configures and starts the gRPC server at the desired port
startEmmyServer configures and starts the gRPC server at the desired port
// startEmmyServer configures and starts the gRPC server at the desired port
func startEmmyServer(port int, certPath, keyPath, dbAddress, logFilePath, logLevel string) error {
	var err error
	var logger log.Logger
	if logFilePath == "" {
		logger, err = log.NewStdoutLogger("server", logLevel, log.FORMAT_LONG)
	} else {
		logger, err = log.NewStdoutFileLogger("server", logFilePath, logLevel, log.FORMAT_LONG,
			log.FORMAT_LONG_COLORLESS)
	}
	if err != nil {
		return err
	}
	srv, err := server.NewServer(certPath, keyPath, dbAddress, logger)
	if err != nil {
		return err
	}
	srv.EnableTracing()
	return srv.Start(port)
}
func startEmmyServer ( port int , certPath , keyPath , dbAddress , logFilePath , logLevel string ) error { var err error var logger log . Logger if logFilePath == " " { logger , err = log . NewStdoutLogger ( " " , logLevel , log . FORMAT_LONG ) } else { logger , err = log . NewStdoutFileLogger ( " " , logFilePath , logLevel , log . FORMAT_LONG , log . FORMAT_LONG_COLORLESS ) } if err != nil { return err } srv , err := server . NewServer ( certPath , keyPath , dbAddress , logger ) if err != nil { return err } srv . EnableTracing ( ) return srv . Start ( port ) }
startEmmyServer configures and starts the gRPC server at the desired port
startEmmyServer configures and starts the gRPC server at the desired port