<commit_before>//
//  logger.swift
//  unchained
//
//  Created by <NAME> on 17/12/15.
//  Copyright © 2015 <NAME>. All rights reserved.
//

#if os(Linux)
    import Glibc
#else
    import Darwin
#endif

public class Log {
    public static var logLevel: LogLevel = .Debug

    public static var logFileName: String? = nil {
        didSet {
            self.logFile = nil
            if let filename = self.logFileName {
                do {
                    self.logFile = try File(filename: filename, mode: .AppendOnly)
                } catch {
                    self.logFileName = nil
                }
            }
        }
    }
    
    private static var logFile: File? = nil

    public enum LogLevel: Int {
        case Debug = 0
        case Info  = 1
        case Warn  = 2
        case Error = 3
        case Fatal = 4<commit_msg>Add missing imports<commit_after>//
//  logger.swift
//  unchained
//
//  Created by <NAME> on 17/12/15.
//  Copyright © 2015 <NAME>. All rights reserved.
//

#if os(Linux)
    import UnchainedGlibc
#else
    import Darwin
#endif

import UnchainedFile
import UnchainedDate

public class Log {
    public static var logLevel: LogLevel = .Debug

    public static var logFileName: String? = nil {
        didSet {
            self.logFile = nil
            if let filename = self.logFileName {
                do {
                    self.logFile = try File(filename: filename, mode: .AppendOnly)
                } catch {
                    self.logFileName = nil
                }
            }
        }
    }
    
    private static var logFile: File? = nil

    public enum LogLevel: Int {
        case Debug = 0
        case Info  = 1
        case Warn  = 2
        case Error = 3
        case Fatal = 4
{'fraction_non_alphanumeric': 0.08409090909090909, 'fraction_numerical': 0.017045454545454544, 'mean_word_length': 1.4323204419889504, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '2088504', 'n_tokens_mistral': 541, 'n_tokens_neox': 493, 'n_words': 165}