func NewMinMaxConstraints(min LogLevel, max LogLevel) (*minMaxConstraints, error) {
	if min > max {
		return nil, fmt.Errorf("min level can't be greater than max. Got min: %d, max: %d", min, max)
	}
	if min < TraceLvl || min > CriticalLvl {
		return nil, fmt.Errorf("min level can't be less than Trace or greater than Critical. Got min: %d", min)
	}
	if max < TraceLvl || max > CriticalLvl {
		return nil, fmt.Errorf("max level can't be less than Trace or greater than Critical. Got max: %d", max)
	}
	return &minMaxConstraints{min, max}, nil
}
NewMinMaxConstraints creates a new minMaxConstraints struct with the specified min and max levels.
package seelog
import (
	"errors"
	"fmt"
	"strings"
)
type logLevelConstraints interface {
	IsAllowed(level LogLevel) bool
}
type minMaxConstraints struct {
	min LogLevel
	max LogLevel
}