Exemple #1
0
func (writer *pluginLogger) Write(b []byte) (int, error) {
	message := string(b)
	prefixedMessage := util.AddPrefixToEachLine(message, fmt.Sprintf("[%s Plugin] : ", writer.pluginName))
	gaugeConsoleWriter := execLogger.Current()
	_, err := gaugeConsoleWriter.Write([]byte(prefixedMessage))
	return len(message), err
}
func (writer *parallelExecutionLogger) Write(b []byte) (int, error) {
	message := indent(string(b), writer.indentation)
	value := util.AddPrefixToEachLine(message, fmt.Sprintf("[%s] : ", writer.name))
	if strings.TrimSpace(message) == "" {
		value = message
	}
	fmt.Print(value)
	return len(b), nil
}
func (writer *parallelExecutionLogger) Error(formatString string, args ...interface{}) {
	logger.Log.Error(util.AddPrefixToEachLine(fmt.Sprintf("[%s] : ", writer.name), formatString), args)
}