@using Humanizer @using StardewModdingAPI.Toolkit.Utilities @using StardewModdingAPI.Web.Framework @using StardewModdingAPI.Web.Framework.LogParsing.Models @using StardewModdingAPI.Web.ViewModels @model StardewModdingAPI.Web.ViewModels.LogParserModel @{ ViewData["Title"] = "SMAPI log parser"; // get log info ParsedLog? log = Model!.ParsedLog; IDictionary contentPacks = Model.GetContentPacksByMod(); ISet screenIds = new HashSet(log?.Messages.Select(p => p.ScreenId) ?? Array.Empty()); // detect suggested fixes LogModInfo[] outdatedMods = log?.Mods.Where(mod => mod.HasUpdate).ToArray() ?? Array.Empty(); LogModInfo? errorHandler = log?.Mods.FirstOrDefault(p => p.IsCodeMod && p.Name == "Error Handler"); bool hasOlderErrorHandler = errorHandler?.GetParsedVersion() is not null && log?.ApiVersionParsed is not null && log.ApiVersionParsed.IsNewerThan(errorHandler.GetParsedVersion()); bool isPyTkCompatibilityMode = log?.ApiVersionParsed?.IsOlderThan("3.15.0") is false && log.Mods.Any(p => p.IsCodeMod && p.Name == "PyTK" && p.GetParsedVersion()?.IsOlderThan("1.24.0") is true); // get filters IDictionary defaultFilters = Enum .GetValues() .ToDictionary(level => level.ToString().ToLower(), level => level != LogLevel.Trace); IDictionary logLevels = Enum .GetValues() .ToDictionary(level => (int)level, level => level.ToString().ToLower()); IDictionary logSections = Enum .GetValues() .ToDictionary(section => (int)section, section => section.ToString()); // get form string curPageUrl = this.Url.PlainAction("Index", "LogParser", new { id = Model.PasteID }, absoluteUrl: true)!; } @section Head { @if (Model.PasteID != null) { } } @* quick navigation links *@ @section SidebarExtra { @if (log != null) { } } @* upload result banner *@ @if (Model.UploadError != null) { } else if (Model.ParseError != null) { } else if (log?.IsValid == true) { } @* save warnings *@ @if (Model.UploadWarning != null || Model.Expiry != null) { @if (Model.UploadWarning != null) { ⚠️ @Model.UploadWarning
} } @* upload new log *@ @if (log == null) {

Where do I find my SMAPI log?

  1. Open a file app (like My Files or MT Manager).
  2. Find the StardewValley folder on your internal storage.
  3. Open the ErrorLogs subfolder.
  4. The log file is SMAPI-crash.txt if it exists, otherwise SMAPI-latest.txt.
  1. Open the Files app.
  2. Click the options menu (might be labeled Go or ).
  3. Choose Enter Location.
  4. Enter this exact text:
    ~/.config/StardewValley/ErrorLogs
  5. The log file is SMAPI-crash.txt if it exists, otherwise SMAPI-latest.txt.
  1. Open the Finder app.
  2. Click Go at the top, then Go to Folder.
  3. Enter this exact text:
    ~/.config/StardewValley/ErrorLogs
  4. The log file is SMAPI-crash.txt if it exists, otherwise SMAPI-latest.txt.
  1. Press the Windows and R buttons at the same time.
  2. In the 'run' box that appears, enter this exact text:
    %appdata%\StardewValley\ErrorLogs
  3. The log file is SMAPI-crash.txt if it exists, otherwise SMAPI-latest.txt.
  1. Press the Windows and R buttons at the same time.
  2. In the 'run' box that appears, enter this exact text:
    %localappdata%\Packages\ConcernedApe.StardewValleyPC_0c8vynj4cqe4e\LocalCache\Roaming\StardewValley\ErrorLogs
  3. If you get an error with the title "Location is not available", try the "with Steam or GOG" instructions above.
  4. Otherwise the log file is SMAPI-crash.txt if it exists, otherwise SMAPI-latest.txt.

How do I share my log?

  1. Drag the file onto this textbox (or choose a file):
  2. Click this button:
  3. On the new page, copy the URL and send it to the person helping you.
} @* parsed log *@ @if (log?.IsValid == true) {
@if (outdatedMods.Any() || errorHandler is null || hasOlderErrorHandler || isPyTkCompatibilityMode || log.IsStrictMode) {

Suggested fixes

    @if (errorHandler is null && log.ApiVersionParsed?.IsNewerThan("3.8.4") is true) {
  • You don't have the Error Handler mod installed. This automatically prevents many game or mod errors. You can reinstall SMAPI to re-add it.
  • } @if (hasOlderErrorHandler) {
  • Your Error Handler mod is older than SMAPI. You may be missing some game/mod error fixes. You can reinstall SMAPI to update it.
  • } @if (isPyTkCompatibilityMode) { if (log.IsStrictMode) {
  • PyTK's image scaling isn't compatible with SMAPI strict mode.
  • } else {
  • PyTK 1.23.* or earlier isn't compatible with newer SMAPI performance optimizations. This may increase loading times or in-game lag.
  • } } @if (outdatedMods.Any()) {
  • Consider updating these mods to fix problems: @foreach (LogModInfo mod in log.Mods.Where(mod => (mod.HasUpdate && !mod.IsContentPack) || (contentPacks.TryGetValue(mod.Name, out LogModInfo[]? contentPackList) && contentPackList.Any(pack => pack.HasUpdate)))) { }
    @mod.Name @if (contentPacks != null && contentPacks.TryGetValue(mod.Name, out LogModInfo[]? contentPackList)) {
    @foreach (LogModInfo contentPack in contentPackList.Where(pack => pack.HasUpdate)) { + @contentPack.Name
    }
    }
    @if (mod.HasUpdate) { @(mod.Version == null ? mod.UpdateVersion : $"{mod.Version} → {mod.UpdateVersion}") } else {   } @if (contentPacks != null && contentPacks.TryGetValue(mod.Name, out contentPackList)) {
    @foreach (LogModInfo contentPack in contentPackList.Where(pack => pack.HasUpdate)) { @contentPack.Version → @contentPack.UpdateVersion
    }
    }
  • } @if (log.IsStrictMode) {
  • SMAPI is running in 'strict mode', which removes all deprecated APIs. This can significantly improve performance, but some mods may not work. You can reinstall SMAPI to disable it if you run into problems.
  • }
}

Log info

Game info:
Stardew Valley: @log.GameVersion on @log.OperatingSystem
SMAPI: @log.ApiVersion @if (log.IsStrictMode) { (strict mode) }
Folder: @log.GamePath
Log started: @log.Timestamp.UtcDateTime.ToString("yyyy-MM-dd HH:mm") UTC ({{localTimeStarted}} your time)

@{ var modsWithContentPacks = log.Mods .Where(mod => mod.Loaded && !mod.IsContentPack) .Select(mod => ( Mod: mod, ContentPacks: contentPacks?.TryGetValue(mod.Name, out LogModInfo[]? contentPackList) == true ? contentPackList : Array.Empty() )) .ToList(); if (contentPacks?.TryGetValue("", out LogModInfo[]? invalidPacks) == true) { modsWithContentPacks.Add(( Mod: new LogModInfo(ModType.CodeMod, "", "", "", ""), ContentPacks: invalidPacks )); } } @foreach ((LogModInfo mod, LogModInfo[] contentPackList) in modsWithContentPacks) { @if (mod.Errors == 0) { } else if (mod.Errors == 1) { } else { } }
Installed mods: @if (!Model.ShowRaw) { click any mod to filter show all hide all toggle content packs in list }
@mod.Name @mod.Version @if (contentPackList.Any()) {
@foreach (var contentPack in contentPackList) { + @contentPack.Name @contentPack.Version
}
(+ @contentPackList.Length content packs) }
@mod.Author @if (contentPackList.Any()) {
@foreach (var contentPack in contentPackList) { + @contentPack.Author
}
}
no errors@mod.Errors error@mod.Errors errors
@if (!Model.ShowRaw) {
Filter messages:
TRACE | DEBUG | INFO | ALERT | WARN | ERROR
.* aA “ ” HL
{{ filterError }}
} else {
@log.RawText
} @if (Model.ShowRaw) { view parsed log } else { view raw log } | download
} else if (log?.IsValid == false) {

Raw log

@log.RawText
}