How can I get the log filename in code? (So I can print it to the console)
My log file is define like this in app.config:
<file value="logfile" />
You look at your LogManager.GetAllRepositories. Inside the repositories you look at all the appenders in ILoggerRepository.GetAppenders. If the appender is of type RollingFileAppender you check its File property, or if you preffer you can check the appender by Name.
That being said it is very bad to do something like this in your code. What if the configuration is changed at deployment and the appender you expect is no longer present?