コード例 #1
0
        static NLogConfigurator()
        {
            _logsFolderLocation    = $"{System.Reflection.Assembly.GetExecutingAssembly().Location.Substring(0, System.Reflection.Assembly.GetExecutingAssembly().Location.Length - 15)}Logs\\";
            _currentLogFileNameApp = $"{_logsFolderLocation}AppLogFile_{DateTime.Now.ToString()}.txt";

            _creationTimer = null;
        }
コード例 #2
0
 //starting timer - at the app startup
 private static void StartTimerForNewLogFileCreationInterval(int hours)
 {
     _creationTimer = new NewLogFileCreatorTimer(hours);
     _creationTimer.TimerElapsed += Creator_TimerElapsed;
 }