logging_log_binary.go 366 B

12345678910111213141516171819202122
  1. //go:build linux && amd64
  2. package fairwind
  3. import (
  4. "fmt"
  5. )
  6. func (this *Log) log(severity int, message string, parameters ...LoggingParameter) {
  7. this.mutex.Lock()
  8. defer this.mutex.Unlock()
  9. line, err := this.formatter.Format(
  10. *NewLogLine(severity, message, parameters),
  11. )
  12. if err != nil {
  13. // TODO: log error OS-specific
  14. return
  15. }
  16. fmt.Println(line)
  17. }