Being able to view your log files within one central location can make debugging and troubleshooting a lot simpler. Like most things nowadays, there are several third-party products that you can implement that will allow you to level up your logging. This year, it seems a lot of companies are choosing Stackify to accomplish this. If you are working with an Episerver powered website, simply installing the Stackify package and doing nothing else will not magically start showing your Episerver logs within the Stackify log portal, we will need some configurations! If you want to learn how to do this, then read on.
How To Add Episerver Logs To Stackify
Luckily, getting your logs into Stackify is very easy. First, I'm assuming that you've installed the Stackify agent onto your server. Next, you need to install the Stackify Log4Net package into your solution:
The other way is to use this NuGet command:
Note: During installation, you'll be prompted to add your Stackify activation key.
After the [package has installed, the next step is to update your
web.config file. You will need to update three app settings:
Next, you'll need to update your
EPiServerLog.config config file and point it to Stackify. Previously, I've just set my default appender to use the Stackify version, so I just needed to update this line:
To look like this:
That should be it 🤩🤩🤩 If you look within the
Logs section in the Stackify portal, you should see your Episerver logs now appearing!
Happy Coding 🤘