Skip to content
This repository has been archived by the owner on Dec 15, 2024. It is now read-only.

Commit

Permalink
Using log in FileIndex
Browse files Browse the repository at this point in the history
  • Loading branch information
dmytro-anokhin committed Oct 22, 2020
1 parent b51a3fe commit b6b574e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions Dependencies/Sources/FileIndex/FileIndex.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import Foundation
import CoreData
import PlainDatabase
import Log


@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
Expand Down Expand Up @@ -66,9 +67,11 @@ public class FileIndex {
public let configuration: Configuration

public init(configuration: Configuration) {
self.configuration = configuration
defer {
log_debug(self, #function, "FileIndex path: \(configuration.directoryURL.path)")
}

print("FileIndex directory: \(configuration.directoryURL.path)")
self.configuration = configuration

// Create directories if necessary. Directory must be created before initializing index or adding files.
try? FileManager.default.createDirectory(at: configuration.filesDirectoryURL, withIntermediateDirectories: true, attributes: nil)
Expand Down
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ let package = Package(
path: "Dependencies/Sources/ImageDecoder"),
.target(
name: "FileIndex",
dependencies: [ "PlainDatabase" ],
dependencies: [ "PlainDatabase", "Log" ],
path: "Dependencies/Sources/FileIndex"),
.target(
name: "PlainDatabase",
Expand Down

0 comments on commit b6b574e

Please sign in to comment.