Skip to content

Commit

Permalink
Enahance logger
Browse files Browse the repository at this point in the history
  • Loading branch information
mono0926 committed May 16, 2017
1 parent a72779f commit 4f353d3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
3 changes: 2 additions & 1 deletion Sources/LicensePlist/main.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import Foundation
import LicensePlistCore
import Commander
import LoggerAPI

private func loadConfig(configPath: URL) -> Config {
if let yaml = configPath.lp.read() {
Expand All @@ -16,7 +17,7 @@ let main = command(Option("cartfile-path", Consts.cartfileName),
Option("config-path", Consts.configPath),
Flag("force"),
Flag("add-version-numbers")) { cartfile, podsPath, output, gitHubToken, configPath, force, version in

Logger.configure()
var config = loadConfig(configPath: URL(fileURLWithPath: configPath))
config.force = force
config.addVersionNumbers = version
Expand Down
4 changes: 1 addition & 3 deletions Sources/LicensePlistCore/LicensePlist.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@ import LoggerAPI

public final class LicensePlist {

public init() {
Logger.configure()
}
public init() {}

public func process(options: Options) {
Log.info("Start")
Expand Down
4 changes: 2 additions & 2 deletions Sources/LicensePlistCore/Logger.swift
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import HeliumLogger
import LoggerAPI

struct Logger {
static func configure() {
public struct Logger {
public static func configure() {
let logger = createDefaultLogger()
// let logger = createDebugLogger()
logger.colored = true
Expand Down

0 comments on commit 4f353d3

Please sign in to comment.