func NewLogLevelException(funcPattern string, filePattern string, constraints logLevelConstraints) (*LogLevelException, error) {
	if constraints == nil {
		return nil, errors.New("constraints can not be nil")
	}
	exception := new(LogLevelException)
	err := exception.initFuncPatternParts(funcPattern)
	if err != nil {
		return nil, err
	}
	exception.funcPattern = strings.Join(exception.funcPatternParts, "")
	err = exception.initFilePatternParts(filePattern)
	if err != nil {
		return nil, err
	}
	exception.filePattern = strings.Join(exception.filePatternParts, "")
	exception.constraints = constraints
	return exception, nil
}
NewLogLevelException creates a new exception.
package seelog
import (
	"errors"
	"fmt"
	"regexp"
	"strings"
)
var (
	fileFormatValidator = regexp.MustCompile(`[a-zA-Z0-9\\/ _\*\.]*`)
	funcFormatValidator = regexp.MustCompile(`[a-zA-Z0-9_\*\.]*`)
)
type LogLevelException struct {
	funcPatternParts []string
	filePatternParts []string
	funcPattern string
	filePattern string
	constraints logLevelConstraints
}