func (s *stdlogAdapter) Write(data []byte) (int, error) {
	str := string(bytes.TrimRight(data, " \t\n"))
	if s.forceLevel != NoLevel {
		_, str := s.pickLevel(str)
		switch s.forceLevel {
		case Trace:
			s.log.Trace(str)
		case Debug:
			s.log.Debug(str)
		case Info:
			s.log.Info(str)
		case Warn:
			s.log.Warn(str)
		case Error:
			s.log.Error(str)
		default:
			s.log.Info(str)
		}
	} else if s.inferLevels {
		level, str := s.pickLevel(str)
		switch level {
		case Trace:
			s.log.Trace(str)
		case Debug:
			s.log.Debug(str)
		case Info:
			s.log.Info(str)
		case Warn:
			s.log.Warn(str)
		case Error:
			s.log.Error(str)
		default:
			s.log.Info(str)
		}
	} else {
		s.log.Info(str)
	}
	return len(data), nil
}
Take the data, infer the levels if configured, and send it through
a regular Logger.
package hclog
import (
	"bytes"
	"strings"
)
type stdlogAdapter struct {
	log         Logger
	inferLevels bool
	forceLevel  Level
}