Skip to content

Commit

Permalink
Fix naming congfig to config (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
anjaeyoung26 authored May 23, 2021
1 parent 2e3b7ee commit 52e5c14
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion EPLogger/Classes/EPLogger.swift
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ public struct Log {
/// // WARNING: This is warning
/// // ERROR: This is error
/// ```
public static func congfig(
public static func config(
level: Log.Level? = nil,
customLevelHeader: [Log.Level : String]? = nil,
formatType: Log.FormatType? = nil,
Expand Down
2 changes: 1 addition & 1 deletion Example/EPLogger/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {

// Set log level. default is verbose
Log.congfig(level: .verbose, dateFormat: "HH:mm:ss.SSS")
Log.config(level: .verbose, dateFormat: "HH:mm:ss.SSS")

return true
}
Expand Down
16 changes: 8 additions & 8 deletions Example/EPLogger/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -67,23 +67,23 @@ final class ViewController: UIViewController {

private func changeFormat() {
print("\n - change format")
Log.congfig(formatType: .short)
Log.config(formatType: .short)
Log.verbose("short")

Log.congfig(formatType: .medium)
Log.config(formatType: .medium)
Log.debug("medium")

Log.congfig(formatType: .long)
Log.config(formatType: .long)
Log.info("long")

Log.congfig(formatType: .full)
Log.config(formatType: .full)
Log.warning("full")
}

private func changeLogLevelHeader() {
Log.congfig(formatType: .short)
Log.config(formatType: .short)
print("\n - change log level header")
Log.congfig(customLevelHeader: [
Log.config(customLevelHeader: [
.verbose: "VERBOSE",
.debug: "DEBUG"
])
Expand All @@ -96,12 +96,12 @@ final class ViewController: UIViewController {

private func changeSeparator() {
print("\n - change separator")
Log.congfig(separator: ": ")
Log.config(separator: ": ")
Log.info("Hello")
Log.warning("world!")
print("")

Log.congfig(
Log.config(
level: .debug,
formatType: .medium,
separator: " -> "
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {

// Set log level. default is verbose
Log.congfig(level: .verbose)
Log.config(level: .verbose)
Log.verbose("This is verbose")
Log.debug("This is debug")
Log.info("This is info")
Expand Down

0 comments on commit 52e5c14

Please sign in to comment.