logging - Cannot log to Windows Events system on .Net Core 1.1 -


i'm trying add event logging asp.net core 1.1 web api (running on windows server 2012) such:

public void configure(iapplicationbuilder app, ihostingenvironment env, iloggerfactory loggerfactory)     {         loggerfactory.addconsole(configuration.getsection("logging"));         loggerfactory.adddebug();         loggerfactory.addeventlog();     } 

but tells me:

'iloggerfactory' not contain definition 'addeventlog' , no extension method 'addeventlog' accepting first argument of type 'iloggerfactory' found (are missing using directive or assembly reference?)

i've tried add "microsoft.extensions.logging.eventlog" project via nuget, says:

package microsoft.extensions.logging.eventlog 1.1.2 not compatible netcoreapp1.1 (.netcoreapp,version=v1.1). package microsoft.extensions.logging.eventlog 1.1.2 supports: net451 (.netframework,version=v4.5.1)  1 or more packages incompatible .netcoreapp,version=v1.1.  package restore failed. rolling package changes 'propworx.api'. 

i guess means it's not possible log windos event system on .net core 1.1?

thanks


Comments

Popular posts from this blog

networking - Vagrant-provisioned VirtualBox VM is not reachable from Ubuntu host -

c# - ASP.NET Core - There is already an object named 'AspNetRoles' in the database -

ruby on rails - ArgumentError: Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true -