1

Topic: Get name of log file

Hi,

I createed SmartInspect object with connection string

m_logger = new SmartInspect(AppName);
logger.Connection = "file(filename=\"file_name\", append=true, rotate=daily)";

As I have read in documentation, in this mode, I'll get a file with name, generated in format "file_name-yyyy-MM-dd-HH-mm-ss". How can I get current filename in run-time?

Thanks.

2

Re: Get name of log file

Hello,

there's currently no API for this in the SmartInspect library. A workaround for this would be to check the target directory of your log file for the created log files (Directory.EnumerateFiles should work for this, for example). The newest log file is the currently active log. I hope this helps.

Regards,
Tobias

3

Re: Get name of log file

Thanks for reply.