I’ve been developing a Grasshopper plugin and can’t find an access point for the Grasshoper plugin that would allow me to initialize logging using Serilog. I assume there is a class that can be overridden to allow me to run code on initialization of the plugin.
Below is the code I need to run.
var log = new LoggerConfiguration()
.MinimumLevel.Debug()
.WriteTo.File("logs\\myapp.txt", rollingInterval: RollingInterval.Day)
.CreateLogger();
Log.Logger = log;
GH_PriorityLoad . (I think it’s called that) drive a class from that and it will get constructed and called on load. You can also abort the loading if you want from there.