Changes

Jump to navigation Jump to search
→‎Log once: update for SMAPI 3.4 release
Line 55: Line 55:     
===Log once===
 
===Log once===
{{SMAPI upcoming|3.4|
   
The <tt>LogOnce</tt> method lets you log a message just [[#Overview|like the above]], but only once per game launch. For example, you can use it to show a compatibility warning for an API call:
 
The <tt>LogOnce</tt> method lets you log a message just [[#Overview|like the above]], but only once per game launch. For example, you can use it to show a compatibility warning for an API call:
 
<source lang="c#">
 
<source lang="c#">
 
this.Monitor.LogOnce("Some Mod Name used the deprecated X API.", LogLevel.Warn);
 
this.Monitor.LogOnce("Some Mod Name used the deprecated X API.", LogLevel.Warn);
 
</source>
 
</source>
}}
      
===Verbose logging===
 
===Verbose logging===
translators
8,445

edits

Navigation menu