Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Ability to change log file location #9

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions Sources/StORM/StORM.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,6 @@
// April 6, 2017: 1.0.3, add support for storing [String] as comma delimited strings


/// Variable defining the global debug state for all classes inheriting from the StORM superclass.
/// When true, certain methods will generate a debug message under certain conditions.
public var StORMdebug = false


/// Base StORM superclass from which all Database-Connector StORM classes inherit.
/// Provides base functionality and rules.
open class StORM {
Expand Down
20 changes: 20 additions & 0 deletions Sources/StORM/StORMDebug.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
//
// StORMDebug.swift
// StORM
//
// Created by Josef Zoller on 09.10.18.
//

/// StORMDebug sets, whether or not some methods of StORM classes generate debug messages
/// and where the log file is located
public struct StORMDebug {
private init(){}

/// The global debug state for all classes inheriting from the StORM superclass.
/// When true, certain methods will generate a debug message under certain conditions.
public static var active = false

/// The location of the log file.
/// The default location is relative, "StORMlog.txt"
public static var location = "./StORMlog.txt"
}