| ... | @@ -129,7 +129,7 @@ fn log( | ... | @@ -129,7 +129,7 @@ fn log( |
| 129 | } | 129 | } |
| 130 | } | 130 | } |
| 131 | | 131 | |
| 132 | /// Log an emergency message to stderr. This log level is intended to be used | 132 | /// Log an emergency message. This log level is intended to be used |
| 133 | /// for conditions that cannot be handled and is usually followed by a panic. | 133 | /// for conditions that cannot be handled and is usually followed by a panic. |
| 134 | pub fn emerg( | 134 | pub fn emerg( |
| 135 | comptime scope: @Type(.EnumLiteral), | 135 | comptime scope: @Type(.EnumLiteral), |
| ... | @@ -140,7 +140,7 @@ pub fn emerg( | ... | @@ -140,7 +140,7 @@ pub fn emerg( |
| 140 | log(.emerg, scope, format, args); | 140 | log(.emerg, scope, format, args); |
| 141 | } | 141 | } |
| 142 | | 142 | |
| 143 | /// Log an alert message to stderr. This log level is intended to be used for | 143 | /// Log an alert message. This log level is intended to be used for |
| 144 | /// conditions that should be corrected immediately (e.g. database corruption). | 144 | /// conditions that should be corrected immediately (e.g. database corruption). |
| 145 | pub fn alert( | 145 | pub fn alert( |
| 146 | comptime scope: @Type(.EnumLiteral), | 146 | comptime scope: @Type(.EnumLiteral), |
| ... | @@ -151,7 +151,7 @@ pub fn alert( | ... | @@ -151,7 +151,7 @@ pub fn alert( |
| 151 | log(.alert, scope, format, args); | 151 | log(.alert, scope, format, args); |
| 152 | } | 152 | } |
| 153 | | 153 | |
| 154 | /// Log a critical message to stderr. This log level is intended to be used | 154 | /// Log a critical message. This log level is intended to be used |
| 155 | /// when a bug has been detected or something has gone wrong and it will have | 155 | /// when a bug has been detected or something has gone wrong and it will have |
| 156 | /// an effect on the operation of the program. | 156 | /// an effect on the operation of the program. |
| 157 | pub fn crit( | 157 | pub fn crit( |
| ... | @@ -163,7 +163,7 @@ pub fn crit( | ... | @@ -163,7 +163,7 @@ pub fn crit( |
| 163 | log(.crit, scope, format, args); | 163 | log(.crit, scope, format, args); |
| 164 | } | 164 | } |
| 165 | | 165 | |
| 166 | /// Log an error message to stderr. This log level is intended to be used when | 166 | /// Log an error message. This log level is intended to be used when |
| 167 | /// a bug has been detected or something has gone wrong but it is recoverable. | 167 | /// a bug has been detected or something has gone wrong but it is recoverable. |
| 168 | pub fn err( | 168 | pub fn err( |
| 169 | comptime scope: @Type(.EnumLiteral), | 169 | comptime scope: @Type(.EnumLiteral), |
| ... | @@ -174,7 +174,7 @@ pub fn err( | ... | @@ -174,7 +174,7 @@ pub fn err( |
| 174 | log(.err, scope, format, args); | 174 | log(.err, scope, format, args); |
| 175 | } | 175 | } |
| 176 | | 176 | |
| 177 | /// Log a warning message to stderr. This log level is intended to be used if | 177 | /// Log a warning message. This log level is intended to be used if |
| 178 | /// it is uncertain whether something has gone wrong or not, but the | 178 | /// it is uncertain whether something has gone wrong or not, but the |
| 179 | /// circumstances would be worth investigating. | 179 | /// circumstances would be worth investigating. |
| 180 | pub fn warn( | 180 | pub fn warn( |
| ... | @@ -185,7 +185,7 @@ pub fn warn( | ... | @@ -185,7 +185,7 @@ pub fn warn( |
| 185 | log(.warn, scope, format, args); | 185 | log(.warn, scope, format, args); |
| 186 | } | 186 | } |
| 187 | | 187 | |
| 188 | /// Log a notice message to stderr. This log level is intended to be used for | 188 | /// Log a notice message. This log level is intended to be used for |
| 189 | /// non-error but significant conditions. | 189 | /// non-error but significant conditions. |
| 190 | pub fn notice( | 190 | pub fn notice( |
| 191 | comptime scope: @Type(.EnumLiteral), | 191 | comptime scope: @Type(.EnumLiteral), |
| ... | @@ -195,7 +195,7 @@ pub fn notice( | ... | @@ -195,7 +195,7 @@ pub fn notice( |
| 195 | log(.notice, scope, format, args); | 195 | log(.notice, scope, format, args); |
| 196 | } | 196 | } |
| 197 | | 197 | |
| 198 | /// Log an info message to stderr. This log level is intended to be used for | 198 | /// Log an info message. This log level is intended to be used for |
| 199 | /// general messages about the state of the program. | 199 | /// general messages about the state of the program. |
| 200 | pub fn info( | 200 | pub fn info( |
| 201 | comptime scope: @Type(.EnumLiteral), | 201 | comptime scope: @Type(.EnumLiteral), |
| ... | @@ -205,7 +205,7 @@ pub fn info( | ... | @@ -205,7 +205,7 @@ pub fn info( |
| 205 | log(.info, scope, format, args); | 205 | log(.info, scope, format, args); |
| 206 | } | 206 | } |
| 207 | | 207 | |
| 208 | /// Log a debug message to stderr. This log level is intended to be used for | 208 | /// Log a debug message. This log level is intended to be used for |
| 209 | /// messages which are only useful for debugging. | 209 | /// messages which are only useful for debugging. |
| 210 | pub fn debug( | 210 | pub fn debug( |
| 211 | comptime scope: @Type(.EnumLiteral), | 211 | comptime scope: @Type(.EnumLiteral), |
| ... | @@ -219,7 +219,7 @@ pub fn debug( | ... | @@ -219,7 +219,7 @@ pub fn debug( |
| 219 | /// provided here. | 219 | /// provided here. |
| 220 | pub fn scoped(comptime scope: @Type(.EnumLiteral)) type { | 220 | pub fn scoped(comptime scope: @Type(.EnumLiteral)) type { |
| 221 | return struct { | 221 | return struct { |
| 222 | /// Log an emergency message to stderr. This log level is intended to be used | 222 | /// Log an emergency message. This log level is intended to be used |
| 223 | /// for conditions that cannot be handled and is usually followed by a panic. | 223 | /// for conditions that cannot be handled and is usually followed by a panic. |
| 224 | pub fn emerg( | 224 | pub fn emerg( |
| 225 | comptime format: []const u8, | 225 | comptime format: []const u8, |
| ... | @@ -229,7 +229,7 @@ pub fn scoped(comptime scope: @Type(.EnumLiteral)) type { | ... | @@ -229,7 +229,7 @@ pub fn scoped(comptime scope: @Type(.EnumLiteral)) type { |
| 229 | log(.emerg, scope, format, args); | 229 | log(.emerg, scope, format, args); |
| 230 | } | 230 | } |
| 231 | | 231 | |
| 232 | /// Log an alert message to stderr. This log level is intended to be used for | 232 | /// Log an alert message. This log level is intended to be used for |
| 233 | /// conditions that should be corrected immediately (e.g. database corruption). | 233 | /// conditions that should be corrected immediately (e.g. database corruption). |
| 234 | pub fn alert( | 234 | pub fn alert( |
| 235 | comptime format: []const u8, | 235 | comptime format: []const u8, |
| ... | @@ -239,7 +239,7 @@ pub fn scoped(comptime scope: @Type(.EnumLiteral)) type { | ... | @@ -239,7 +239,7 @@ pub fn scoped(comptime scope: @Type(.EnumLiteral)) type { |
| 239 | log(.alert, scope, format, args); | 239 | log(.alert, scope, format, args); |
| 240 | } | 240 | } |
| 241 | | 241 | |
| 242 | /// Log a critical message to stderr. This log level is intended to be used | 242 | /// Log a critical message. This log level is intended to be used |
| 243 | /// when a bug has been detected or something has gone wrong and it will have | 243 | /// when a bug has been detected or something has gone wrong and it will have |
| 244 | /// an effect on the operation of the program. | 244 | /// an effect on the operation of the program. |
| 245 | pub fn crit( | 245 | pub fn crit( |
| ... | @@ -250,7 +250,7 @@ pub fn scoped(comptime scope: @Type(.EnumLiteral)) type { | ... | @@ -250,7 +250,7 @@ pub fn scoped(comptime scope: @Type(.EnumLiteral)) type { |
| 250 | log(.crit, scope, format, args); | 250 | log(.crit, scope, format, args); |
| 251 | } | 251 | } |
| 252 | | 252 | |
| 253 | /// Log an error message to stderr. This log level is intended to be used when | 253 | /// Log an error message. This log level is intended to be used when |
| 254 | /// a bug has been detected or something has gone wrong but it is recoverable. | 254 | /// a bug has been detected or something has gone wrong but it is recoverable. |
| 255 | pub fn err( | 255 | pub fn err( |
| 256 | comptime format: []const u8, | 256 | comptime format: []const u8, |
| ... | @@ -260,7 +260,7 @@ pub fn scoped(comptime scope: @Type(.EnumLiteral)) type { | ... | @@ -260,7 +260,7 @@ pub fn scoped(comptime scope: @Type(.EnumLiteral)) type { |
| 260 | log(.err, scope, format, args); | 260 | log(.err, scope, format, args); |
| 261 | } | 261 | } |
| 262 | | 262 | |
| 263 | /// Log a warning message to stderr. This log level is intended to be used if | 263 | /// Log a warning message. This log level is intended to be used if |
| 264 | /// it is uncertain whether something has gone wrong or not, but the | 264 | /// it is uncertain whether something has gone wrong or not, but the |
| 265 | /// circumstances would be worth investigating. | 265 | /// circumstances would be worth investigating. |
| 266 | pub fn warn( | 266 | pub fn warn( |
| ... | @@ -270,7 +270,7 @@ pub fn scoped(comptime scope: @Type(.EnumLiteral)) type { | ... | @@ -270,7 +270,7 @@ pub fn scoped(comptime scope: @Type(.EnumLiteral)) type { |
| 270 | log(.warn, scope, format, args); | 270 | log(.warn, scope, format, args); |
| 271 | } | 271 | } |
| 272 | | 272 | |
| 273 | /// Log a notice message to stderr. This log level is intended to be used for | 273 | /// Log a notice message. This log level is intended to be used for |
| 274 | /// non-error but significant conditions. | 274 | /// non-error but significant conditions. |
| 275 | pub fn notice( | 275 | pub fn notice( |
| 276 | comptime format: []const u8, | 276 | comptime format: []const u8, |
| ... | @@ -279,7 +279,7 @@ pub fn scoped(comptime scope: @Type(.EnumLiteral)) type { | ... | @@ -279,7 +279,7 @@ pub fn scoped(comptime scope: @Type(.EnumLiteral)) type { |
| 279 | log(.notice, scope, format, args); | 279 | log(.notice, scope, format, args); |
| 280 | } | 280 | } |
| 281 | | 281 | |
| 282 | /// Log an info message to stderr. This log level is intended to be used for | 282 | /// Log an info message. This log level is intended to be used for |
| 283 | /// general messages about the state of the program. | 283 | /// general messages about the state of the program. |
| 284 | pub fn info( | 284 | pub fn info( |
| 285 | comptime format: []const u8, | 285 | comptime format: []const u8, |
| ... | @@ -288,7 +288,7 @@ pub fn scoped(comptime scope: @Type(.EnumLiteral)) type { | ... | @@ -288,7 +288,7 @@ pub fn scoped(comptime scope: @Type(.EnumLiteral)) type { |
| 288 | log(.info, scope, format, args); | 288 | log(.info, scope, format, args); |
| 289 | } | 289 | } |
| 290 | | 290 | |
| 291 | /// Log a debug message to stderr. This log level is intended to be used for | 291 | /// Log a debug message. This log level is intended to be used for |
| 292 | /// messages which are only useful for debugging. | 292 | /// messages which are only useful for debugging. |
| 293 | pub fn debug( | 293 | pub fn debug( |
| 294 | comptime format: []const u8, | 294 | comptime format: []const u8, |