Changes

Jump to navigation Jump to search
→‎Verbose logging: add example config
Line 63: Line 63:     
===Verbose logging===
 
===Verbose logging===
You can have messages appear in the log (and console in the ''for developers'' version) only if SMAPI's verbose logging option is enabled. This is meant for diagnostic information that's sometimes needed to troubleshoot, but doesn't need to be logged in most cases. Players can enable verbose logging by editing the <samp>smapi-internal/StardewModdingAPI.config.json</samp> file.
+
You can have messages appear in the log (and console in the ''for developers'' version) only if SMAPI's verbose logging option is enabled. This is meant for diagnostic information that's sometimes needed to troubleshoot, but doesn't need to be logged in most cases.
    
There are two ways to use it:
 
There are two ways to use it:
Line 73: Line 73:  
if (this.Monitor.IsVerbose)
 
if (this.Monitor.IsVerbose)
 
   this.Monitor("This will only appear if verbose logging is enabled.", LogLevel.Trace);
 
   this.Monitor("This will only appear if verbose logging is enabled.", LogLevel.Trace);
 +
</syntaxhighlight>
 +
 +
Players can enable verbose logging by adding your mod ID to the <samp>VerboseLogging</samp> field in the <samp>smapi-internal/StardewModdingAPI.config.json</samp> file. For example, this enables it for SMAPI and Content Patcher:
 +
<syntaxhighlight lang="js">
 +
"VerboseLogging": [ "SMAPI", "Pathoschild.ContentPatcher" ],
 
</syntaxhighlight>
 
</syntaxhighlight>
  
translators
8,403

edits

Navigation menu