cardigannindexer: add optional arg to strdump

when you are using multiple strdumps it is useful to tag them with an unique eyecatcher so you can tell them apart in the enhanced log.
This commit is contained in:
Garfield69 2020-03-19 09:09:58 +13:00
parent 324afbcd0f
commit 392a0d7b7e
1 changed files with 6 additions and 1 deletions

View File

@ -1102,7 +1102,12 @@ namespace Jackett.Common.Indexers
case "strdump":
// for debugging
var DebugData = Data.Replace("\r", "\\r").Replace("\n", "\\n").Replace("\xA0", "\\xA0");
logger.Debug(string.Format("CardigannIndexer ({0}): strdump: {1}", ID, DebugData));
var strTag = (string)Filter.Args;
if (strTag != null)
strTag = string.Format("({0}):", strTag);
else
strTag = ":";
logger.Debug(string.Format("CardigannIndexer ({0}): strdump{1} {2}", ID, strTag, DebugData));
break;
default:
break;