@@ -33,63 +33,63 @@ func InitDefaultLoggerWithSample(logger Logger, sampleRate float64) {
3333}
3434
3535// Debug write the debug log
36- func Debug (format string , args ... interface {} ) {
36+ func Debug (format string , args ... any ) {
3737 DefaultLogger ().Debug (format , args ... )
3838}
3939
4040// Info write the info log
41- func Info (format string , args ... interface {} ) {
41+ func Info (format string , args ... any ) {
4242 DefaultLogger ().Info (format , args ... )
4343}
4444
4545// Warn write the warn log
46- func Warn (format string , args ... interface {} ) {
46+ func Warn (format string , args ... any ) {
4747 DefaultLogger ().Warn (format , args ... )
4848}
4949
5050// Error write the error log
51- func Error (err error , format string , args ... interface {} ) {
51+ func Error (err error , format string , args ... any ) {
5252 DefaultLogger ().Error (err , format , args ... )
5353}
5454
5555// ErrorIf write the error log if err is not nil
56- func ErrorIf (err error , format string , args ... interface {} ) error {
56+ func ErrorIf (err error , format string , args ... any ) error {
5757 if err != nil {
5858 Error (err , format , args ... )
5959 }
6060 return err
6161}
6262
6363// DebugSample write the debug log by random sampling
64- func DebugSample (format string , args ... interface {} ) {
64+ func DebugSample (format string , args ... any ) {
6565 DefaultSampleLogger ().Debug (format , args ... )
6666}
6767
6868// InfoSample write the info log by random sampling
69- func InfoSample (format string , args ... interface {} ) {
69+ func InfoSample (format string , args ... any ) {
7070 DefaultSampleLogger ().Info (format , args ... )
7171}
7272
7373// WarnSample write the warn log by random sampling
74- func WarnSample (format string , args ... interface {} ) {
74+ func WarnSample (format string , args ... any ) {
7575 DefaultSampleLogger ().Warn (format , args ... )
7676}
7777
7878// ErrorSample write the error log by random sampling
79- func ErrorSample (err error , format string , args ... interface {} ) {
79+ func ErrorSample (err error , format string , args ... any ) {
8080 DefaultSampleLogger ().Error (err , format , args ... )
8181}
8282
8383// ErrorIfSample write the error log by random sampling if err is not nil
84- func ErrorIfSample (err error , format string , args ... interface {} ) error {
84+ func ErrorIfSample (err error , format string , args ... any ) error {
8585 if err != nil {
8686 ErrorSample (err , format , args ... )
8787 }
8888 return err
8989}
9090
9191// Log write the log without level
92- func Log (format string , args ... interface {} ) {
92+ func Log (format string , args ... any ) {
9393 DefaultLogger ().Log (format , args ... )
9494}
9595
0 commit comments