Skip to content
This repository was archived by the owner on Feb 8, 2023. It is now read-only.

Commit 0d37e9c

Browse files
committed
Use logger when dumping stack
1 parent 158378b commit 0d37e9c

File tree

2 files changed

+22
-5
lines changed

2 files changed

+22
-5
lines changed

CoreDataKit/CoreDataStack.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,11 @@ public class CoreDataStack: NSObject {
5757
/**
5858
Dumps some debug info about this stack to the console
5959
*/
60-
public func debugDump() {
61-
println("Stores: \(persistentStoreCoordinator.persistentStores)")
62-
println(" - Store coordinator: \(persistentStoreCoordinator.debugDescription)")
63-
println(" - Root context: \(rootContext.debugDescription)")
64-
println(" - Main thread context: \(mainThreadContext.debugDescription)")
60+
public func dumpStack() {
61+
CoreDataKit.sharedLogger(.DEBUG, "Stores: \(persistentStoreCoordinator.persistentStores)")
62+
CoreDataKit.sharedLogger(.DEBUG, " - Store coordinator: \(persistentStoreCoordinator.debugDescription)")
63+
CoreDataKit.sharedLogger(.DEBUG, " - Root context: \(rootContext.debugDescription)")
64+
CoreDataKit.sharedLogger(.DEBUG, " - Main thread context: \(mainThreadContext.debugDescription)")
6565
}
6666

6767
// MARK: Notification observers
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
//
2+
// CoreDataStack+ImportingTests.swift
3+
// CoreDataKit
4+
//
5+
// Created by Mathijs Kadijk on 05-11-14.
6+
// Copyright (c) 2014 Mathijs Kadijk. All rights reserved.
7+
//
8+
9+
import XCTest
10+
import CoreData
11+
import CoreDataKit
12+
13+
class CoreDataStackImportingTests: TestCase {
14+
func testDumpImportConfiguration() {
15+
coreDataStack.dumpImportConfiguration()
16+
}
17+
}

0 commit comments

Comments
 (0)