in src/NLog.AWS.Logger/AWSTarget.cs [261:291]
protected override void InitializeTarget()
{
if (_core != null)
{
_core.Close();
_core = null;
}
var config = new AWSLoggerConfig(RenderSimpleLayout(LogGroup, nameof(LogGroup)))
{
DisableLogGroupCreation = DisableLogGroupCreation,
Region = RenderSimpleLayout(Region, nameof(Region)),
ServiceUrl = RenderSimpleLayout(ServiceUrl, nameof(ServiceUrl)),
Credentials = Credentials,
Profile = RenderSimpleLayout(Profile, nameof(Profile)),
ProfilesLocation = RenderSimpleLayout(ProfilesLocation, nameof(ProfilesLocation)),
BatchPushInterval = BatchPushInterval,
BatchSizeInBytes = BatchSizeInBytes,
MaxQueuedMessages = MaxQueuedMessages,
LogStreamName = RenderSimpleLayout(LogStreamName, nameof(LogStreamName)),
LogStreamNameSuffix = RenderSimpleLayout(LogStreamNameSuffix, nameof(LogStreamNameSuffix)),
LogStreamNamePrefix = RenderSimpleLayout(LogStreamNamePrefix, nameof(LogStreamNamePrefix)),
LibraryLogErrors = LibraryLogErrors,
LibraryLogFileName = LibraryLogFileName,
FlushTimeout = FlushTimeout,
NewLogGroupRetentionInDays = NewLogGroupRetentionInDays,
AuthenticationRegion = RenderSimpleLayout(AuthenticationRegion, nameof(AuthenticationRegion)),
};
_core = new AWSLoggerCore(config, _userAgentString);
_core.LogLibraryAlert += AwsLogLibraryAlert;
}