mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-26 13:08:24 +01:00
first
This commit is contained in:
parent
bd62d51ec9
commit
b578433e37
1 changed files with 784842 additions and 0 deletions
48
Brutal.Monitor.Common/Shared.cs
Normal file
48
Brutal.Monitor.Common/Shared.cs
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
namespace Brutal.Monitor.Common;
|
||||
|
||||
public enum DumpType
|
||||
{
|
||||
None = 0,
|
||||
Triage,
|
||||
Mini,
|
||||
Full,
|
||||
Heap,
|
||||
}
|
||||
|
||||
public struct CollectorOptions
|
||||
{
|
||||
/// <summary>Directory dumps are written under, in FirstChance and LastChance subfolders. Must already exist.</summary>
|
||||
public string DumpPath = "";
|
||||
|
||||
public DumpType FirstChance = DumpType.None;
|
||||
public DumpType LastChance = DumpType.None;
|
||||
|
||||
public int KeepCount = 5; // number of dumps to keep
|
||||
|
||||
/// <summary>
|
||||
/// Milliseconds allowed for writing a crash dump, which a dying host waits out.
|
||||
/// </summary>
|
||||
public int DumpTimeoutMs = 60000;
|
||||
|
||||
public CollectorOptions() { }
|
||||
}
|
||||
|
||||
public struct LoggerOptions
|
||||
{
|
||||
/// <summary>Directory the log file ("<name>.<stamp>.<pid>.log") is created in. Must already exist.</summary>
|
||||
public string LogDirectory = "";
|
||||
|
||||
/// <summary>
|
||||
/// How often buffered log lines are flushed to the OS page cache, bounding what a hard
|
||||
/// crash loses from the log file. Floors at 100ms.
|
||||
/// </summary>
|
||||
public int FlushIntervalMs = 100;
|
||||
|
||||
/// <summary>
|
||||
/// Archived logs and recovered crash tails to retain per name. Zero keeps every one,
|
||||
/// which grows without bound, so the default is a real number a shipped game can live with.
|
||||
/// </summary>
|
||||
public int MaxArchives = 10;
|
||||
|
||||
public LoggerOptions() { }
|
||||
}
|
||||
Loading…
Reference in a new issue