have nlog write to console
Check out the official tutorial here.
You need to add output rules:
<rules>
<logger name="*" minlevel="Info" writeTo="console" />
</rules>
Also simplify your console target:
<target name="console" xsi:type="Console" />
Many useful samples are here: Most useful NLog configurations
You can configure from code as well:
var config = new NLog.Config.LoggingConfiguration();
// Targets where to log to: Console
var logconsole = new NLog.Targets.ConsoleTarget("logconsole");
// Rules for mapping loggers to targets
config.AddRule(LogLevel.Info, LogLevel.Fatal, logconsole);
// Apply config
NLog.LogManager.Configuration = config;
Use:
var logger = NLog.LogManager.GetCurrentClassLogger();
logger.Info("hello");