Skip to content

Commit

Permalink
Merge pull request #37 from TencentBlueKing/logging
Browse files Browse the repository at this point in the history
fix: rename and fix log default args
  • Loading branch information
MrLYC committed May 5, 2022
2 parents ae3ab21 + ee24435 commit b80ca5c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion logging/log/base.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ package log

import (
"log"
"os"

"logur.dev/logur"

Expand All @@ -26,5 +27,5 @@ func SetLogger(name string, logger *log.Logger, level logur.Level) {

// EnsureDefaultLogger will replace the default logger by log default logger.
func EnsureDefaultLogger(level logur.Level) {
SetLogger(logging.DefaultLoggerName, log.Default(), level)
SetLogger(logging.DefaultLoggerName, log.New(os.Stderr, log.Prefix(), log.Flags()), level)
}
2 changes: 1 addition & 1 deletion logging/logrus/base.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* specific language governing permissions and limitations under the License.
*/

package zap
package logrus

import (
"github.com/sirupsen/logrus"
Expand Down

0 comments on commit b80ca5c

Please sign in to comment.