Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
默认情况下,SmtpPickupDirAppender appender 创建一个没有扩展名的文件。我找不到配置文件扩展名的参数(或其他选项)。
从“pickupDir”参数中指定的目录中提取文件的电子邮件服务需要文件扩展名。
有没有办法指定一个?
不是内置的。
从源代码来看,它看起来只是基于 guid 创建一个文件名,并且不提供任何配置选项,
filePath = Path.Combine(m_pickupDir, SystemInfo.NewGuid().ToString("N")); writer = File.CreateText(filePath);
但是,如果您拉取源代码,则创建自己的添加文件扩展名的附加程序应该相对简单。