mirror of
https://github.com/Jackett/Jackett.git
synced 2025-09-17 17:34:09 +02:00
Fix tracing/logging options
This commit is contained in:
@@ -25,7 +25,6 @@ namespace JackettConsole
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
Engine.BuildContainer(new WebApi2Module());
|
|
||||||
var options = new ConsoleOptions();
|
var options = new ConsoleOptions();
|
||||||
if (!Parser.Default.ParseArguments(args, options) || options.ShowHelp == true)
|
if (!Parser.Default.ParseArguments(args, options) || options.ShowHelp == true)
|
||||||
{
|
{
|
||||||
@@ -53,6 +52,26 @@ namespace JackettConsole
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
|
// Logging
|
||||||
|
if (options.Logging)
|
||||||
|
JackettStartup.LogRequests = true;
|
||||||
|
|
||||||
|
// Tracing
|
||||||
|
if (options.Tracing)
|
||||||
|
JackettStartup.TracingEnabled = true;
|
||||||
|
|
||||||
|
// Initialize autofac, logger, etc.
|
||||||
|
Engine.BuildContainer(new WebApi2Module());
|
||||||
|
|
||||||
|
// Log after the fact as using the logger will cause the options above to be used
|
||||||
|
|
||||||
|
if (options.Logging)
|
||||||
|
Engine.Logger.Info("Logging enabled.");
|
||||||
|
|
||||||
|
if (options.Tracing)
|
||||||
|
Engine.Logger.Info("Tracing enabled.");
|
||||||
|
|
||||||
if (options.ListenPublic && options.ListenPrivate)
|
if (options.ListenPublic && options.ListenPrivate)
|
||||||
{
|
{
|
||||||
Console.WriteLine("You can only use listen private OR listen publicly.");
|
Console.WriteLine("You can only use listen private OR listen publicly.");
|
||||||
@@ -74,21 +93,6 @@ namespace JackettConsole
|
|||||||
JackettStartup.ProxyConnection = options.ProxyConnection.ToLowerInvariant();
|
JackettStartup.ProxyConnection = options.ProxyConnection.ToLowerInvariant();
|
||||||
Engine.Logger.Info("Proxy enabled. " + JackettStartup.ProxyConnection);
|
Engine.Logger.Info("Proxy enabled. " + JackettStartup.ProxyConnection);
|
||||||
}
|
}
|
||||||
// Logging
|
|
||||||
if (options.Logging)
|
|
||||||
JackettStartup.LogRequests = true;
|
|
||||||
|
|
||||||
// Tracing
|
|
||||||
if (options.Tracing)
|
|
||||||
JackettStartup.TracingEnabled = true;
|
|
||||||
|
|
||||||
// Log after the fact as using the logger will cause the options above to be used
|
|
||||||
|
|
||||||
if (options.Logging)
|
|
||||||
Engine.Logger.Info("Logging enabled.");
|
|
||||||
|
|
||||||
if (options.Tracing)
|
|
||||||
Engine.Logger.Info("Tracing enabled.");
|
|
||||||
|
|
||||||
if (options.SSLFix == true)
|
if (options.SSLFix == true)
|
||||||
Engine.Logger.Info("SSL ECC workaround enabled.");
|
Engine.Logger.Info("SSL ECC workaround enabled.");
|
||||||
|
Reference in New Issue
Block a user