Skip to content

Commit 63a18e4

Browse files
authoredNov 5, 2019
Merge pull request #8 from rbaumbach/change-default-dir
Change default dir
2 parents 59782c2 + 21abbe6 commit 63a18e4

File tree

5 files changed

+7
-5
lines changed

5 files changed

+7
-5
lines changed
 

‎IntegrationSpecs/QuickELoggerObjCIntegrationSpec.swift

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ class QuickELoggerObjCIntegrationSpec: QuickSpec {
88
describe("QuickELoggerObjC") {
99
var subject: QuickELoggerObjC!
1010

11+
// Mas cleanup...
12+
1113
beforeSuite {
1214
deleteTestArtifacts()
1315
}

‎IntegrationSpecs/Utils/Utils.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import Foundation
22
@testable import QuickELogger
33

4-
func getLogMessages(filename: String = "QuickELogger", directory: Directory = .documents()) -> [LogMessage] {
4+
func getLogMessages(filename: String = "QuickELogger", directory: Directory = .applicationSupport(path: "QuickELogger/")) -> [LogMessage] {
55
let fullFilename = filename + ".json"
66

77
let fullPathOfJSONFile = FileUtils().buildFullFileURL(directory: directory,

‎QuickELogger/Source/ObjC/QuickELoggerObjC.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -66,14 +66,14 @@ public class QuickELoggerObjC: NSObject {
6666

6767
@objc
6868
public convenience override init() {
69-
let defaultDirectoryInfo = ObjCDirectoryInfo(directory: .documents, additionalPath: nil)
69+
let defaultDirectoryInfo = ObjCDirectoryInfo(directory: .applicationSupport, additionalPath: "QuickELogger/")
7070

7171
self.init(filename: "QuickELogger", directoryInfo: defaultDirectoryInfo)
7272
}
7373

7474
@objc
7575
public convenience init(filename: String) {
76-
let defaultDirectoryInfo = ObjCDirectoryInfo(directory: .documents, additionalPath: nil)
76+
let defaultDirectoryInfo = ObjCDirectoryInfo(directory: .applicationSupport, additionalPath: "QuickELogger/")
7777

7878
self.init(filename: filename, directoryInfo: defaultDirectoryInfo)
7979
}

‎QuickELogger/Source/Swift/QuickELogger.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public class QuickELogger: NSObject, QuickELoggerProtocol {
5454

5555
// MARK: - Init methods
5656

57-
public init(filename: String = "QuickELogger", directory: Directory = .documents()) {
57+
public init(filename: String = "QuickELogger", directory: Directory = .applicationSupport(path: "QuickELogger/")) {
5858
self.filename = filename
5959
self.directory = directory
6060

‎README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ A quick and simple way to log messages to disk on your iPhone or iPad app.
2323
* Objective-C -> Create an instance of `QuickELoggerObjC`, and calling `logWithMessage:type:`
2424
* This logger has the following (pretty standard) log types: `verbose, info, debug, warn, error`.
2525

26-
Note: By default the file is saved in the `/Documents` directory with the filename `QuickELogger.json`.
26+
Note: By default the file is saved in the `/Library/Application Support/QuickELogger/` directory with the filename `QuickELogger.json`.
2727

2828
### Additional configuration options
2929

0 commit comments

Comments
 (0)
Please sign in to comment.