remove unnecessary code in main

This commit is contained in:
Darien Raymond committed 2016-10-03 21:37:09 +02:00
1 parent 67793eb3e0
commit bd9b7c586e
1 file changed
-19
-19
View File
@@ -36,7 +36,6 @@ import (
var (
configFile string
logLevel = flag.String("loglevel", "warning", "Level of log info to be printed to console, available value: debug, info, warning, error")
version = flag.Bool("version", false, "Show current version of V2Ray.")
test = flag.Bool("test", false, "Test config file only, without launching V2Ray server.")
format = flag.String("format", "json", "Format of input file.")
@@ -52,20 +51,6 @@ func init() {
}
func startV2Ray() *point.Point {
switch *logLevel {
case "debug":
log.SetLogLevel(log.DebugLevel)
case "info":
log.SetLogLevel(log.InfoLevel)
case "warning":
log.SetLogLevel(log.WarningLevel)
case "error":
log.SetLogLevel(log.ErrorLevel)
default:
fmt.Println("Unknown log level: " + *logLevel)
return nil
}
if len(configFile) == 0 {
log.Error("Config file is not set.")
return nil
@@ -89,10 +74,6 @@ func startV2Ray() *point.Point {
return nil
}
if config.LogConfig != nil && len(config.LogConfig.AccessLog) > 0 {
log.InitAccessLogger(config.LogConfig.AccessLog)
}
vPoint, err := point.NewPoint(config)
if err != nil {
log.Error("Failed to create Point server: ", err)