github.com/gogf/gf@v1.16.9/os/glog/glog_api.go (about)

     1  // Copyright GoFrame Author(https://goframe.org). All Rights Reserved.
     2  //
     3  // This Source Code Form is subject to the terms of the MIT License.
     4  // If a copy of the MIT was not distributed with this file,
     5  // You can obtain one at https://github.com/gogf/gf.
     6  
     7  package glog
     8  
     9  // Print prints `v` with newline using fmt.Sprintln.
    10  // The parameter `v` can be multiple variables.
    11  func Print(v ...interface{}) {
    12  	logger.Print(v...)
    13  }
    14  
    15  // Printf prints `v` with format `format` using fmt.Sprintf.
    16  // The parameter `v` can be multiple variables.
    17  func Printf(format string, v ...interface{}) {
    18  	logger.Printf(format, v...)
    19  }
    20  
    21  // Println is alias of Print.
    22  // See Print.
    23  func Println(v ...interface{}) {
    24  	logger.Println(v...)
    25  }
    26  
    27  // Fatal prints the logging content with [FATA] header and newline, then exit the current process.
    28  func Fatal(v ...interface{}) {
    29  	logger.Fatal(v...)
    30  }
    31  
    32  // Fatalf prints the logging content with [FATA] header, custom format and newline, then exit the current process.
    33  func Fatalf(format string, v ...interface{}) {
    34  	logger.Fatalf(format, v...)
    35  }
    36  
    37  // Panic prints the logging content with [PANI] header and newline, then panics.
    38  func Panic(v ...interface{}) {
    39  	logger.Panic(v...)
    40  }
    41  
    42  // Panicf prints the logging content with [PANI] header, custom format and newline, then panics.
    43  func Panicf(format string, v ...interface{}) {
    44  	logger.Panicf(format, v...)
    45  }
    46  
    47  // Info prints the logging content with [INFO] header and newline.
    48  func Info(v ...interface{}) {
    49  	logger.Info(v...)
    50  }
    51  
    52  // Infof prints the logging content with [INFO] header, custom format and newline.
    53  func Infof(format string, v ...interface{}) {
    54  	logger.Infof(format, v...)
    55  }
    56  
    57  // Debug prints the logging content with [DEBU] header and newline.
    58  func Debug(v ...interface{}) {
    59  	logger.Debug(v...)
    60  }
    61  
    62  // Debugf prints the logging content with [DEBU] header, custom format and newline.
    63  func Debugf(format string, v ...interface{}) {
    64  	logger.Debugf(format, v...)
    65  }
    66  
    67  // Notice prints the logging content with [NOTI] header and newline.
    68  // It also prints caller stack info if stack feature is enabled.
    69  func Notice(v ...interface{}) {
    70  	logger.Notice(v...)
    71  }
    72  
    73  // Noticef prints the logging content with [NOTI] header, custom format and newline.
    74  // It also prints caller stack info if stack feature is enabled.
    75  func Noticef(format string, v ...interface{}) {
    76  	logger.Noticef(format, v...)
    77  }
    78  
    79  // Warning prints the logging content with [WARN] header and newline.
    80  // It also prints caller stack info if stack feature is enabled.
    81  func Warning(v ...interface{}) {
    82  	logger.Warning(v...)
    83  }
    84  
    85  // Warningf prints the logging content with [WARN] header, custom format and newline.
    86  // It also prints caller stack info if stack feature is enabled.
    87  func Warningf(format string, v ...interface{}) {
    88  	logger.Warningf(format, v...)
    89  }
    90  
    91  // Error prints the logging content with [ERRO] header and newline.
    92  // It also prints caller stack info if stack feature is enabled.
    93  func Error(v ...interface{}) {
    94  	logger.Error(v...)
    95  }
    96  
    97  // Errorf prints the logging content with [ERRO] header, custom format and newline.
    98  // It also prints caller stack info if stack feature is enabled.
    99  func Errorf(format string, v ...interface{}) {
   100  	logger.Errorf(format, v...)
   101  }
   102  
   103  // Critical prints the logging content with [CRIT] header and newline.
   104  // It also prints caller stack info if stack feature is enabled.
   105  func Critical(v ...interface{}) {
   106  	logger.Critical(v...)
   107  }
   108  
   109  // Criticalf prints the logging content with [CRIT] header, custom format and newline.
   110  // It also prints caller stack info if stack feature is enabled.
   111  func Criticalf(format string, v ...interface{}) {
   112  	logger.Criticalf(format, v...)
   113  }