diff --git a/TimberWinR/Inputs/GeneratorInput.cs b/TimberWinR/Inputs/GeneratorInput.cs index 3abb5e7..e22cdb8 100644 --- a/TimberWinR/Inputs/GeneratorInput.cs +++ b/TimberWinR/Inputs/GeneratorInput.cs @@ -59,11 +59,10 @@ namespace TimberWinR.Inputs { LogManager.GetCurrentClassLogger().Info("Generator Creating {0} Lines", _params.Count); - int numMessages = _params.Count; - if (numMessages == 0) - numMessages = int.MaxValue; + int numMessages = _params.Count; - for (int i = 0; i < numMessages; i++) + // Infinite or until done. + for (int i = 0; (_params.Count == 0 || i < numMessages); i++) { if (CancelToken.IsCancellationRequested) break; diff --git a/TimberWinR/mdocs/Generator.md b/TimberWinR/mdocs/Generator.md index 655b3c1..a2cb660 100644 --- a/TimberWinR/mdocs/Generator.md +++ b/TimberWinR/mdocs/Generator.md @@ -3,7 +3,7 @@ The Generator input can be used to Generate log files for test purposes. ## Parameters -The following parameters are allowed when configuring WindowsEvents. +The following parameters are allowed when configuring the test log Generator. | Parameter | Type | Description | Details | Default | | :---------------- |:---------------| :----------------------------------------------------------------------- | :--------------------------- | :-- | @@ -30,7 +30,7 @@ Example: Generate 100000 "Hello Win32-InputGen" messages } ``` ## Fields -After a successful parse of an event, the following fields are added: +After a successful parse of the generated line, the following fields are added: | Name | Type | Description | | ---- |:-----| :-----------|