func NewForwarder(logInsightServer string, logInsightPort int, logInsightReservedFields,
	logInsightAgentID string, logInsightHasJsonLogMsg, debugging bool, concurrentWorkers int, insecureSkipVerify bool) logging.Logging {

	url := fmt.Sprintf("https://%s:%d/api/v1/messages/ingest/%s", logInsightServer, logInsightPort, logInsightAgentID)
	logging.LogStd(fmt.Sprintf("Using %s for log insight", url), true)

	http.DefaultTransport.(*http.Transport).TLSClientConfig = &tls.Config{InsecureSkipVerify: insecureSkipVerify}

	theForwarder := &Forwarder{
		LogInsightReservedFields: strings.Split(logInsightReservedFields, ","),
		url:                      &url,
		hasJSONLogMsg:            logInsightHasJsonLogMsg,
		debug:                    debugging,
		channel:                  make(chan *ChannelMessage, 1024),
	}
	for i := 0; i < concurrentWorkers; i++ {
		go theForwarder.ConsumeMessages()
	}

	return theForwarder
}
//NewForwarder - Creates new instance of LogInsight that implments logging.Logging interface
Creates new instance of LogInsight that implments logging.Logging interface
// NewForwarder - Creates new instance of LogInsight that implments logging . Logging interface
func NewForwarder(logInsightServer string, logInsightPort int, logInsightReservedFields,
	logInsightAgentID string, logInsightHasJsonLogMsg, debugging bool, concurrentWorkers int, insecureSkipVerify bool) logging.Logging {
	url := fmt.Sprintf("https://%s:%d/api/v1/messages/ingest/%s", logInsightServer, logInsightPort, logInsightAgentID)
	logging.LogStd(fmt.Sprintf("Using %s for log insight", url), true)
	http.DefaultTransport.(*http.Transport).TLSClientConfig = &tls.Config{InsecureSkipVerify: insecureSkipVerify}
	theForwarder := &Forwarder{
		LogInsightReservedFields: strings.Split(logInsightReservedFields, ","),
		url:                      &url,
		hasJSONLogMsg:            logInsightHasJsonLogMsg,
		debug:                    debugging,
		channel:                  make(chan *ChannelMessage, 1024),
	}
	for i := 0; i < concurrentWorkers; i++ {
		go theForwarder.ConsumeMessages()
	}
	return theForwarder
}
func NewForwarder ( logInsightServer string , logInsightPort int , logInsightReservedFields , logInsightAgentID string , logInsightHasJsonLogMsg , debugging bool , concurrentWorkers int , insecureSkipVerify bool ) logging . Logging { url := fmt . Sprintf ( " " , logInsightServer , logInsightPort , logInsightAgentID ) logging . LogStd ( fmt . Sprintf ( " " , url ) , true ) http . DefaultTransport . ( * http . Transport ) . TLSClientConfig = & tls . Config { InsecureSkipVerify : insecureSkipVerify } theForwarder := & Forwarder { LogInsightReservedFields : strings . Split ( logInsightReservedFields , " " ) , url : & url , hasJSONLogMsg : logInsightHasJsonLogMsg , debug : debugging , channel : make ( chan * ChannelMessage , 1024 ) , } for i := 0 ; i < concurrentWorkers ; i ++ { go theForwarder . ConsumeMessages ( ) } return theForwarder }
Creates new instance of LogInsight that implments logging.Logging interface
Creates new instance of LogInsight that implments logging . Logging interface