@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"; ParsedLog? log = Model!.ParsedLog; IDictionary contentPacks = Model.GetContentPacksByMod(); 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()); string curPageUrl = this.Url.PlainAction("Index", "LogParser", new { id = Model.PasteID }, absoluteUrl: true); ISet screenIds = new HashSet(log?.Messages.Select(p => p.ScreenId) ?? Array.Empty()); } @section Head { @if (Model.PasteID != 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 (log.Mods.Any(mod => mod.HasUpdate)) {

Suggested fixes

  • 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
    }
    }
}

Log info

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

@foreach (var mod in log.Mods.Where(p => p.Loaded && !p.IsContentPack)) { if (contentPacks == null || !contentPacks.TryGetValue(mod.Name, out LogModInfo[]? contentPackList)) contentPackList = null; @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 != null) {
@foreach (var contentPack in contentPackList) { + @contentPack.Name @contentPack.Version
}
(+ @contentPackList.Length content packs) }
@mod.Author @if (contentPackList != null) {
@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
} else {
@log.RawText
} @if (Model.ShowRaw) { view parsed log } else { view raw log } | download
} else if (log?.IsValid == false) {

Raw log

@log.RawText
}