using NLog; // Setup NLog configuration var config = new NLog.Config.LoggingConfiguration(); var consoleTarget = new NLog.Targets.ConsoleTarget("console"); config.AddRule(LogLevel.Info, LogLevel.Fatal, consoleTarget); NLog.LogManager.Configuration = config; // Get logger instance and log messages var logger = NLog.LogManager.GetCurrentClassLogger(); logger.Info("This is an informational message."); logger.Info("User {0} logged in from {1}.", userName, ipAddress);In this example, we first set up the NLog configuration with a console target that logs messages from `Info` to `Fatal` levels. Then we get a logger instance with the `GetCurrentClassLogger` method and log two messages with the `Info` method. The second message uses an interpolated string to include variables. The package library for NLog is `NLog`. You can install it via NuGet, or add it to your project manually.