mirror of
https://github.com/openbullet/openbullet.git
synced 2023-10-21 07:33:42 -05:00
Added info on the Proxy Type to different logs.
This commit is contained in:
@@ -659,7 +659,8 @@ namespace RuriLib.Runner
|
||||
================= */
|
||||
|
||||
// Print the start message
|
||||
BotLog.Add(new LogEntry(string.Format("===== LOG FOR BOT #{0} WITH DATA {1} AND PROXY {2} =====" + Environment.NewLine, bot.Id, botData.Data.Data, botData.Proxy == null ? "NONE" : botData.Proxy.Proxy), Colors.White));
|
||||
var proxyUsedText = botData.Proxy == null ? "NONE" : $"{botData.Proxy.Proxy} ({botData.Proxy.Type})";
|
||||
BotLog.Add(new LogEntry($"===== LOG FOR BOT #{bot.Id} WITH DATA {botData.Data.Data} AND PROXY {proxyUsedText} ====={Environment.NewLine}", Colors.White));
|
||||
if (!Settings.General.EnableBotLog) BotLog.Add(new LogEntry("The Bot Logging is disabled in General Settings", Colors.Tomato));
|
||||
|
||||
// Open browser if Always Open
|
||||
@@ -688,14 +689,14 @@ namespace RuriLib.Runner
|
||||
{
|
||||
if (Settings.General.BotsDisplayMode == BotsDisplayMode.Everything)
|
||||
bot.Status = $"<<< ERROR IN BLOCK: {loli.CurrentBlock} >>>";
|
||||
RaiseMessageArrived(LogLevel.Error, $"[{bot.Id}][{bot.Data}][{bot.Proxy}] ERROR in block {loli.CurrentBlock} | Exception: {ex.Message}", false);
|
||||
RaiseMessageArrived(LogLevel.Error, $"[{bot.Id}][{bot.Data}][{proxyUsedText}] ERROR in block {loli.CurrentBlock} | Exception: {ex.Message}", false);
|
||||
Thread.Sleep(1000);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
if (Settings.General.BotsDisplayMode == BotsDisplayMode.Everything)
|
||||
bot.Status = "<<< SCRIPT ERROR >>>";
|
||||
RaiseMessageArrived(LogLevel.Error, $"[{bot.Id}][{bot.Data}][{bot.Proxy}] ERROR in the script | Exception: {ex.Message}", false);
|
||||
RaiseMessageArrived(LogLevel.Error, $"[{bot.Id}][{bot.Data}][{proxyUsedText}] ERROR in the script | Exception: {ex.Message}", false);
|
||||
Thread.Sleep(1000);
|
||||
}
|
||||
|
||||
@@ -713,7 +714,7 @@ namespace RuriLib.Runner
|
||||
if (Settings.General.BotsDisplayMode != BotsDisplayMode.None)
|
||||
bot.Status = $"<<< FINISHED WITH RESULT: {botData.StatusString} >>>";
|
||||
|
||||
RaiseMessageArrived(LogLevel.Info, $"[{bot.Id}][{bot.Data}][{bot.Proxy}] Ended with result {botData.StatusString}", false);
|
||||
RaiseMessageArrived(LogLevel.Info, $"[{bot.Id}][{bot.Data}][{proxyUsedText}] Ended with result {botData.StatusString}", false);
|
||||
|
||||
// Quit Browser if Always Quit
|
||||
if (Config.Settings.AlwaysQuit)
|
||||
|
||||
Reference in New Issue
Block a user