github.com/dolthub/go-mysql-server@v0.18.0/log.go (about) 1 // Copyright 2020-2021 Dolthub, Inc. 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 15 package sqle 16 17 import ( 18 vtlog "github.com/dolthub/vitess/go/vt/log" 19 "github.com/sirupsen/logrus" 20 ) 21 22 func init() { 23 // Flush ensures any pending I/O is written. 24 vtlog.Flush = func() {} 25 26 // Info formats arguments like fmt.Print. 27 vtlog.Info = logrus.Info 28 // Infof formats arguments like fmt.Printf. 29 vtlog.Infof = logrus.Infof 30 31 // Warning formats arguments like fmt.Print. 32 vtlog.Warning = logrus.Warning 33 // Warningf formats arguments like fmt.Printf. 34 vtlog.Warningf = logrus.Warningf 35 36 // Error formats arguments like fmt.Print. 37 vtlog.Error = logrus.Error 38 // Errorf formats arguments like fmt.Printf. 39 vtlog.Errorf = logrus.Errorf 40 41 // Fatal formats arguments like fmt.Print. 42 vtlog.Fatal = logrus.Fatal 43 // Fatalf formats arguments like fmt.Printf 44 vtlog.Fatalf = logrus.Fatalf 45 }