Changes

Jump to navigation Jump to search
+ LogOnce in SMAPI 3.4
Line 53: Line 53:  
| 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.
 
| 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.
 
|}
 
|}
 +
 +
===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:
 +
<source lang="c#">
 +
this.Monitor.LogOnce("Some Mod Name used the deprecated X API.", LogLevel.Warn);
 +
</source>
 +
}}
    
===Verbose logging===
 
===Verbose logging===
translators
8,403

edits

Navigation menu