<commit_before>package main

import (
	"fmt"
	"os"
	"path/filepath"
	"regexp"
	"time"

	"github.com/malashin/cpbftpchk/xftp"
)

var c xftp.IFtp
var err error

var regExpLine = regexp.MustCompile(`\?\{(.*)\?\}(.*)\?\|(\d+)\?\|(.*)$`)
var logFilePath = "shuher.log"
var fileListPath = "shuherFileList.txt"
var watcherRootPath = "/"
var ignoreFoldersMask = regexp.MustCompile(`^/AMEDIATEKA/PROMO$`)
var fileMask = regexp.MustCompile(`(?:\.mxf|\.mp4)$`)
var lastLine string
var longSleepTime = 30 * time.Minute
var shortSleepTime = 1 * time.Minute

func main() {
	// Get filepath to executable.
	bin, err := os.Executable()
	if err != nil {
		panic(err)
	}
	binPath := filepath.Dir(bin)

	// Create objects.
	fileWriter := NewFileWriter(filepath.Join(binPath, logFilePath))
	defer fileWriter.Close()
	mailWriter := NewMailWriter()
	logger := NewLogger()
	logger.AddLogger(LogLevelLeq(Debug), fileWriter)
	logger.AddLogger(Notice, mailWriter)
	logger.AddLogger(LogLevelLeq(Info), os.Stdout)
	ftpConn := NewFtpConn()
	ftpConn.SetLogger(logger)
	fileList := NewFileList()
	fileList.SetLogger(logger)
	// Load file list.
	fileList.Load(filepath.Join(binPath, fileListPath))
	// Properly close the connection on exit.<commit_msg>Change write to file log level<commit_after>package main

import (
	"fmt"
	"os"
	"path/filepath"
	"regexp"
	"time"

	"github.com/malashin/cpbftpchk/xftp"
)

var c xftp.IFtp
var err error

var regExpLine = regexp.MustCompile(`\?\{(.*)\?\}(.*)\?\|(\d+)\?\|(.*)$`)
var logFilePath = "shuher.log"
var fileListPath = "shuherFileList.txt"
var watcherRootPath = "/"
var ignoreFoldersMask = regexp.MustCompile(`^/AMEDIATEKA/PROMO$`)
var fileMask = regexp.MustCompile(`(?:\.mxf|\.mp4)$`)
var lastLine string
var longSleepTime = 30 * time.Minute
var shortSleepTime = 1 * time.Minute

func main() {
	// Get filepath to executable.
	bin, err := os.Executable()
	if err != nil {
		panic(err)
	}
	binPath := filepath.Dir(bin)

	// Create objects.
	fileWriter := NewFileWriter(filepath.Join(binPath, logFilePath))
	defer fileWriter.Close()
	mailWriter := NewMailWriter()
	logger := NewLogger()
	logger.AddLogger(LogLevelLeq(Info), fileWriter)
	logger.AddLogger(Notice, mailWriter)
	logger.AddLogger(LogLevelLeq(Info), os.Stdout)
	ftpConn := NewFtpConn()
	ftpConn.SetLogger(logger)
	fileList := NewFileList()
	fileList.SetLogger(logger)
	// Load file list.
	fileList.Load(filepath.Join(binPath, fileListPath))
	// Properly close the connection on exit.
{'fraction_non_alphanumeric': 0.15879478827361562, 'fraction_numerical': 0.003257328990228013, 'mean_word_length': 4.794811320754717, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4270826', 'n_tokens_mistral': 955, 'n_tokens_neox': 914, 'n_words': 188}