23 lines
602 B
C#
23 lines
602 B
C#
using NLog;
|
|
using NLog.Extensions.Logging;
|
|
using PiwigoDirectorySync;
|
|
using PiwigoDirectorySync.Commands.Scan;
|
|
using Spectre.Console.Cli;
|
|
|
|
LogManager.Configuration = new NLogLoggingConfiguration(AppSettings.Config.GetSection("NLog"));
|
|
var logFactory = LogManager.Setup().LogFactory;
|
|
var logger = logFactory.GetCurrentClassLogger();
|
|
|
|
logger.Info("Starting command app");
|
|
var app = new CommandApp();
|
|
app.Configure(config =>
|
|
{
|
|
#if DEBUG
|
|
config.PropagateExceptions();
|
|
config.ValidateExamples();
|
|
#endif
|
|
|
|
config.AddCommand<ScanCommand>("scan");
|
|
});
|
|
|
|
return app.Run(args); |