I have this Class library(.net standard) which contains an Abp module and I want to log exceptions via AbpCastleLog4NetModule. this class library is going to be used in an .net core console project.
[DependsOn(typeof(ANOTHERMODULE),typeof(AbpCastleLog4NetModule))]
public class MyModule : AbpModule
{
public override void PostInitialize()
{
var waitTime = 30000;
timer = new Timer((x) =>
{
Integration();
}, null, 0, waitTime);
}
private void Integration()
{
var waitTime=30000;
timer.Change(Timeout.Infinite, Timeout.Infinite);
foreach (var sftpOptions in optionsCollections)
{
try
{
//Do Something
}
catch (Exception ex)
{
//log errors
}
}
timer.Change(waitTime, waitTime);
}
}
can anyone help me with a working sample?