github.com/zhongdalu/gf@v1.0.0/g/os/glog/glog_api.go (about)

     1  // Copyright 2017 gf Author(https://github.com/zhongdalu/gf). 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/zhongdalu/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  // See Print.
    22  func Println(v ...interface{}) {
    23  	logger.Println(v...)
    24  }
    25  
    26  // Deprecated.
    27  // Use Printf instead.
    28  func Printfln(format string, v ...interface{}) {
    29  	logger.Printfln(format, v...)
    30  }
    31  
    32  // Fatal prints the logging content with [FATA] header and newline, then exit the current process.
    33  func Fatal(v ...interface{}) {
    34  	logger.Fatal(v...)
    35  }
    36  
    37  // Fatalf prints the logging content with [FATA] header, custom format and newline, then exit the current process.
    38  func Fatalf(format string, v ...interface{}) {
    39  	logger.Fatalf(format, v...)
    40  }
    41  
    42  // Deprecated.
    43  // Use Fatalf instead.
    44  func Fatalfln(format string, v ...interface{}) {
    45  	logger.Fatalfln(format, v...)
    46  }
    47  
    48  // Panic prints the logging content with [PANI] header and newline, then panics.
    49  func Panic(v ...interface{}) {
    50  	logger.Panic(v...)
    51  }
    52  
    53  // Panicf prints the logging content with [PANI] header, custom format and newline, then panics.
    54  func Panicf(format string, v ...interface{}) {
    55  	logger.Panicf(format, v...)
    56  }
    57  
    58  // Deprecated.
    59  // Use Panicf instead.
    60  func Panicfln(format string, v ...interface{}) {
    61  	logger.Panicfln(format, v...)
    62  }
    63  
    64  // Info prints the logging content with [INFO] header and newline.
    65  func Info(v ...interface{}) {
    66  	logger.Info(v...)
    67  }
    68  
    69  // Infof prints the logging content with [INFO] header, custom format and newline.
    70  func Infof(format string, v ...interface{}) {
    71  	logger.Infof(format, v...)
    72  }
    73  
    74  // Deprecated.
    75  // Use Infof instead.
    76  func Infofln(format string, v ...interface{}) {
    77  	logger.Infofln(format, v...)
    78  }
    79  
    80  // Debug prints the logging content with [DEBU] header and newline.
    81  func Debug(v ...interface{}) {
    82  	logger.Debug(v...)
    83  }
    84  
    85  // Debugf prints the logging content with [DEBU] header, custom format and newline.
    86  func Debugf(format string, v ...interface{}) {
    87  	logger.Debugf(format, v...)
    88  }
    89  
    90  // Deprecated.
    91  // Use Debugf instead.
    92  func Debugfln(format string, v ...interface{}) {
    93  	logger.Debugfln(format, v...)
    94  }
    95  
    96  // Notice prints the logging content with [NOTI] header and newline.
    97  // It also prints caller stack info if stack feature is enabled.
    98  func Notice(v ...interface{}) {
    99  	logger.Notice(v...)
   100  }
   101  
   102  // Noticef prints the logging content with [NOTI] header, custom format and newline.
   103  // It also prints caller stack info if stack feature is enabled.
   104  func Noticef(format string, v ...interface{}) {
   105  	logger.Noticef(format, v...)
   106  }
   107  
   108  // Deprecated.
   109  // Use Noticef instead.
   110  func Noticefln(format string, v ...interface{}) {
   111  	logger.Noticefln(format, v...)
   112  }
   113  
   114  // Warning prints the logging content with [WARN] header and newline.
   115  // It also prints caller stack info if stack feature is enabled.
   116  func Warning(v ...interface{}) {
   117  	logger.Warning(v...)
   118  }
   119  
   120  // Warningf prints the logging content with [WARN] header, custom format and newline.
   121  // It also prints caller stack info if stack feature is enabled.
   122  func Warningf(format string, v ...interface{}) {
   123  	logger.Warningf(format, v...)
   124  }
   125  
   126  // Deprecated.
   127  // Use Warningf instead.
   128  func Warningfln(format string, v ...interface{}) {
   129  	logger.Warningfln(format, v...)
   130  }
   131  
   132  // Error prints the logging content with [ERRO] header and newline.
   133  // It also prints caller stack info if stack feature is enabled.
   134  func Error(v ...interface{}) {
   135  	logger.Error(v...)
   136  }
   137  
   138  // Errorf prints the logging content with [ERRO] header, custom format and newline.
   139  // It also prints caller stack info if stack feature is enabled.
   140  func Errorf(format string, v ...interface{}) {
   141  	logger.Errorf(format, v...)
   142  }
   143  
   144  // Deprecated.
   145  // Use Errorf instead.
   146  func Errorfln(format string, v ...interface{}) {
   147  	logger.Errorfln(format, v...)
   148  }
   149  
   150  // Critical prints the logging content with [CRIT] header and newline.
   151  // It also prints caller stack info if stack feature is enabled.
   152  func Critical(v ...interface{}) {
   153  	logger.Critical(v...)
   154  }
   155  
   156  // Criticalf prints the logging content with [CRIT] header, custom format and newline.
   157  // It also prints caller stack info if stack feature is enabled.
   158  func Criticalf(format string, v ...interface{}) {
   159  	logger.Criticalf(format, v...)
   160  }
   161  
   162  // Deprecated.
   163  // Use Criticalf instead.
   164  func Criticalfln(format string, v ...interface{}) {
   165  	logger.Criticalfln(format, v...)
   166  }