Changes

Jump to navigation Jump to search
→‎Logging: restore colors (they're shown in the SMAPI console), copyedit (no need to repeat the log level name in each description), undo incorrect information (DEBUG level is shown to players, INFO isn't meant for "general events", and ALERT is definitely not for errors)
Line 17: Line 17:  
</syntaxhighlight>
 
</syntaxhighlight>
   −
...will produce entries in the log with a timestamp, log level, name of the mod writing the log entry, and the log message itself:
+
...will produce log entries with a timestamp, log level, mod name, and message:
   −
<pre>
+
<div style="font-family: monospace;">
[18:00:00 TRACE NameOfMod] a trace message
+
<span style="color:#666;">[18:00:00 TRACE NameOfMod] a trace message</span><br />
[18:00:00 DEBUG NameOfMod] a debug message
+
<span style="color:#666;">[18:00:00 DEBUG NameOfMod] a debug message</span><br />
[18:00:00 INFO  NameOfMod] an info message
+
<span style="color:black;">[18:00:00 INFO  NameOfMod] an info message</span><br />
[18:00:00 WARN  NameOfMod] a warning message
+
<span style="color:darkorange;">[18:00:00 WARN  NameOfMod] a warning message</span><br />
[18:00:00 ERROR NameOfMod] an error message
+
<span style="color:red;">[18:00:00 ERROR NameOfMod] an error message</span>
</pre>
+
</div>
    
===Log levels===
 
===Log levels===
Line 36: Line 36:  
|-
 
|-
 
| <samp>Trace</samp>
 
| <samp>Trace</samp>
| Tracing info is intended for developers, and are usually low-level troubleshooting details that are useful when someone sends you their error log. Trace messages won't appear in the console window by default (unless you have the "SMAPI for developers" version), though they're always written to the log file.
+
| Tracing info intended for developers, usually low-level troubleshooting details that are useful when someone sends you their error log. Trace messages won't appear in the console window by default (unless you have the "SMAPI for developers" version), though they're always written to the log file.
 
|-
 
|-
 
| <samp>Debug</samp>
 
| <samp>Debug</samp>
| Debug info contains troubleshooting details that may be relevant to the developer.
+
| Troubleshooting details that may be relevant to the player.
 
|-
 
|-
 
| <samp>Info</samp>
 
| <samp>Info</samp>
| Info messages are relevant to the player, logging when general or higher-level events happen. This should be used judiciously.
+
| Info relevant to the player. This should be used judiciously.
 
|-
 
|-
 
| <samp>Warn</samp>
 
| <samp>Warn</samp>
| Warnings are for announcing potential problems that could happen that the player should be aware of. This should be used rarely.
+
| Potential problems that the player should be aware of. This should be used rarely.
 
|-
 
|-
 
| <samp>Error</samp>
 
| <samp>Error</samp>
| Error messages describe a problem that happened or something that went wrong.
+
| A message indicating something went wrong.
 
|-
 
|-
 
| <samp>Alert</samp>
 
| <samp>Alert</samp>
| Alerts are severe errors that the mod cannot recover from. They contain important information to highlight what player action is needed (''e.g.,'' new version available). This should be used rarely to avoid alert fatigue.
+
| Important information to highlight for the player when player action is needed (''e.g.,'' new version available). This should be used rarely to avoid alert fatigue.
 
|}
 
|}
  
translators
8,447

edits

Navigation menu