Skip to content

Commit

Permalink
2.0改版
Browse files Browse the repository at this point in the history
同时支持Swift和ObjC的接口
  • Loading branch information
张鹏 committed Jun 30, 2020
1 parent 7759955 commit 0eba662
Show file tree
Hide file tree
Showing 42 changed files with 1,858 additions and 604 deletions.
14 changes: 7 additions & 7 deletions DPLog.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Pod::Spec.new do |s|
#

s.name = "DPLog"
s.version = "1.0"
s.version = "2.0"
s.summary = "日志工具"

# This description is used to generate tags and improve search results.
Expand All @@ -28,7 +28,7 @@ Pod::Spec.new do |s|
日志工具,支持各种定制:format、logger
DESC

s.homepage = "http://dpdev.cn/"
s.homepage = "https://github.com/DancewithPeng/DPLog.git"
# s.screenshots = "www.example.com/screenshots_1.gif", "www.example.com/screenshots_2.gif"


Expand All @@ -39,8 +39,8 @@ Pod::Spec.new do |s|
# Popular ones are 'MIT', 'BSD' and 'Apache License, Version 2.0'.
#

s.license = "MIT"
# s.license = { :type => "MIT", :file => "FILE_LICENSE" }
# s.license = "MIT"
s.license = { :type => "MIT", :file => "LICENSE" }


# ――― Author Metadata ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
Expand All @@ -65,7 +65,7 @@ Pod::Spec.new do |s|
#

# s.platform = :ios
s.platform = :ios, "9.0"
s.platform = :ios, "10.0"

# When using multiple platforms
# s.ios.deployment_target = "5.0"
Expand All @@ -74,7 +74,7 @@ Pod::Spec.new do |s|
# s.tvos.deployment_target = "9.0"

# ――― Language ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
s.swift_version = "4.0"
s.swift_version = "5.2"

# ――― Source Location ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
Expand All @@ -93,7 +93,7 @@ Pod::Spec.new do |s|
# Not including the public_header_files will make all headers public.
#

s.source_files = "DPLog/Source/*.{swift}"
s.source_files = "DPLog/Sources/**/*.{swift,h,m}"
# s.exclude_files = "Classes/Exclude"

# s.public_header_files = "Classes/**/*.h"
Expand Down
120 changes: 87 additions & 33 deletions DPLog.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,19 @@
objects = {

/* Begin PBXBuildFile section */
6E896CE92071BC25001DC8D9 /* DPLogFormatParser.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6E896CE82071BC25001DC8D9 /* DPLogFormatParser.swift */; };
6E896CEB2071BD8F001DC8D9 /* DPDefaultLogFormatParser.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6E896CEA2071BD8F001DC8D9 /* DPDefaultLogFormatParser.swift */; };
6E896CED2071BE1E001DC8D9 /* DPLogger.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6E896CEC2071BE1E001DC8D9 /* DPLogger.swift */; };
6E896CEF2071BE3D001DC8D9 /* DPConsoleLogger.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6E896CEE2071BE3D001DC8D9 /* DPConsoleLogger.swift */; };
6E896CF12071BFDE001DC8D9 /* DPLogLevel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6E896CF02071BFDE001DC8D9 /* DPLogLevel.swift */; };
6EA340C724A9C5BC003773F8 /* DPLogInformation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6EA340C624A9C5BC003773F8 /* DPLogInformation.swift */; };
6EA340CA24A9CB75003773F8 /* DPConsoleLogger.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6EA340C924A9CB75003773F8 /* DPConsoleLogger.swift */; };
6EA340CC24A9CBE4003773F8 /* DPLogDefaultFormatter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6EA340CB24A9CBE4003773F8 /* DPLogDefaultFormatter.swift */; };
6EA3410924A9E556003773F8 /* DPLogObjC.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EA3410724A9E555003773F8 /* DPLogObjC.h */; settings = {ATTRIBUTES = (Public, ); }; };
6EA3410A24A9E556003773F8 /* DPLogObjC.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EA3410824A9E556003773F8 /* DPLogObjC.m */; };
6EDB842320689D7C0025D556 /* DPLog.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6EDB841920689D7C0025D556 /* DPLog.framework */; };
6EDB842820689D7C0025D556 /* DPLogTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6EDB842720689D7C0025D556 /* DPLogTests.swift */; };
6EDB842A20689D7C0025D556 /* DPLog.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EDB841C20689D7C0025D556 /* DPLog.h */; settings = {ATTRIBUTES = (Public, ); }; };
6EDB843520689DB60025D556 /* DPLog.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6EDB843420689DB60025D556 /* DPLog.swift */; };
6EED0EAF24A9BA2100D1921A /* DPLogLevel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6EED0EAE24A9BA2100D1921A /* DPLogLevel.swift */; };
6EED0EB124A9BA5B00D1921A /* Log.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6EED0EB024A9BA5B00D1921A /* Log.swift */; };
6EED0EB324A9C1FA00D1921A /* DPLogCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6EED0EB224A9C1FA00D1921A /* DPLogCoordinator.swift */; };
6EED0EB524A9C27100D1921A /* DPLogger.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6EED0EB424A9C27100D1921A /* DPLogger.swift */; };
6EED0EB724A9C3A000D1921A /* DPLogFormatter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6EED0EB624A9C3A000D1921A /* DPLogFormatter.swift */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand All @@ -29,18 +33,22 @@
/* End PBXContainerItemProxy section */

/* Begin PBXFileReference section */
6E896CE82071BC25001DC8D9 /* DPLogFormatParser.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DPLogFormatParser.swift; sourceTree = "<group>"; };
6E896CEA2071BD8F001DC8D9 /* DPDefaultLogFormatParser.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DPDefaultLogFormatParser.swift; sourceTree = "<group>"; };
6E896CEC2071BE1E001DC8D9 /* DPLogger.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DPLogger.swift; sourceTree = "<group>"; };
6E896CEE2071BE3D001DC8D9 /* DPConsoleLogger.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DPConsoleLogger.swift; sourceTree = "<group>"; };
6E896CF02071BFDE001DC8D9 /* DPLogLevel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DPLogLevel.swift; sourceTree = "<group>"; };
6EA340C624A9C5BC003773F8 /* DPLogInformation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DPLogInformation.swift; sourceTree = "<group>"; };
6EA340C924A9CB75003773F8 /* DPConsoleLogger.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DPConsoleLogger.swift; sourceTree = "<group>"; };
6EA340CB24A9CBE4003773F8 /* DPLogDefaultFormatter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DPLogDefaultFormatter.swift; sourceTree = "<group>"; };
6EA3410724A9E555003773F8 /* DPLogObjC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DPLogObjC.h; sourceTree = "<group>"; };
6EA3410824A9E556003773F8 /* DPLogObjC.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = DPLogObjC.m; sourceTree = "<group>"; };
6EDB841920689D7C0025D556 /* DPLog.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = DPLog.framework; sourceTree = BUILT_PRODUCTS_DIR; };
6EDB841C20689D7C0025D556 /* DPLog.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DPLog.h; sourceTree = "<group>"; };
6EDB841D20689D7C0025D556 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
6EDB842220689D7C0025D556 /* DPLogTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = DPLogTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
6EDB842720689D7C0025D556 /* DPLogTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DPLogTests.swift; sourceTree = "<group>"; };
6EDB842920689D7C0025D556 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
6EDB843420689DB60025D556 /* DPLog.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DPLog.swift; sourceTree = "<group>"; };
6EED0EAE24A9BA2100D1921A /* DPLogLevel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DPLogLevel.swift; sourceTree = "<group>"; };
6EED0EB024A9BA5B00D1921A /* Log.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Log.swift; sourceTree = "<group>"; };
6EED0EB224A9C1FA00D1921A /* DPLogCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DPLogCoordinator.swift; sourceTree = "<group>"; };
6EED0EB424A9C27100D1921A /* DPLogger.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DPLogger.swift; sourceTree = "<group>"; };
6EED0EB624A9C3A000D1921A /* DPLogFormatter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DPLogFormatter.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand All @@ -62,6 +70,23 @@
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
6EA340C824A9C7C3003773F8 /* Formatters */ = {
isa = PBXGroup;
children = (
6EA340CB24A9CBE4003773F8 /* DPLogDefaultFormatter.swift */,
);
path = Formatters;
sourceTree = "<group>";
};
6EA3410B24A9E565003773F8 /* ObjC */ = {
isa = PBXGroup;
children = (
6EA3410724A9E555003773F8 /* DPLogObjC.h */,
6EA3410824A9E556003773F8 /* DPLogObjC.m */,
);
path = ObjC;
sourceTree = "<group>";
};
6EDB840F20689D7C0025D556 = {
isa = PBXGroup;
children = (
Expand All @@ -83,9 +108,8 @@
6EDB841B20689D7C0025D556 /* DPLog */ = {
isa = PBXGroup;
children = (
6EDB841C20689D7C0025D556 /* DPLog.h */,
6EDB841D20689D7C0025D556 /* Info.plist */,
6EDB843320689D850025D556 /* Source */,
6EDB843320689D850025D556 /* Sources */,
);
path = DPLog;
sourceTree = "<group>";
Expand All @@ -99,17 +123,37 @@
path = DPLogTests;
sourceTree = "<group>";
};
6EDB843320689D850025D556 /* Source */ = {
6EDB843320689D850025D556 /* Sources */ = {
isa = PBXGroup;
children = (
6EDB841C20689D7C0025D556 /* DPLog.h */,
6EED0EB824A9C4EE00D1921A /* Core */,
6EA340C824A9C7C3003773F8 /* Formatters */,
6EED0EB924A9C4F700D1921A /* Loggers */,
6EA3410B24A9E565003773F8 /* ObjC */,
);
path = Sources;
sourceTree = "<group>";
};
6EED0EB824A9C4EE00D1921A /* Core */ = {
isa = PBXGroup;
children = (
6EED0EB024A9BA5B00D1921A /* Log.swift */,
6EED0EAE24A9BA2100D1921A /* DPLogLevel.swift */,
6EED0EB224A9C1FA00D1921A /* DPLogCoordinator.swift */,
6EED0EB424A9C27100D1921A /* DPLogger.swift */,
6EED0EB624A9C3A000D1921A /* DPLogFormatter.swift */,
6EA340C624A9C5BC003773F8 /* DPLogInformation.swift */,
);
path = Core;
sourceTree = "<group>";
};
6EED0EB924A9C4F700D1921A /* Loggers */ = {
isa = PBXGroup;
children = (
6EDB843420689DB60025D556 /* DPLog.swift */,
6E896CF02071BFDE001DC8D9 /* DPLogLevel.swift */,
6E896CE82071BC25001DC8D9 /* DPLogFormatParser.swift */,
6E896CEA2071BD8F001DC8D9 /* DPDefaultLogFormatParser.swift */,
6E896CEC2071BE1E001DC8D9 /* DPLogger.swift */,
6E896CEE2071BE3D001DC8D9 /* DPConsoleLogger.swift */,
6EA340C924A9CB75003773F8 /* DPConsoleLogger.swift */,
);
path = Source;
path = Loggers;
sourceTree = "<group>";
};
/* End PBXGroup section */
Expand All @@ -120,6 +164,7 @@
buildActionMask = 2147483647;
files = (
6EDB842A20689D7C0025D556 /* DPLog.h in Headers */,
6EA3410924A9E556003773F8 /* DPLogObjC.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -174,11 +219,12 @@
TargetAttributes = {
6EDB841820689D7C0025D556 = {
CreatedOnToolsVersion = 9.2;
LastSwiftMigration = 0920;
LastSwiftMigration = 1150;
ProvisioningStyle = Automatic;
};
6EDB842120689D7C0025D556 = {
CreatedOnToolsVersion = 9.2;
LastSwiftMigration = 1150;
ProvisioningStyle = Automatic;
};
};
Expand All @@ -189,6 +235,7 @@
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = 6EDB840F20689D7C0025D556;
productRefGroup = 6EDB841A20689D7C0025D556 /* Products */;
Expand Down Expand Up @@ -223,12 +270,15 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
6E896CE92071BC25001DC8D9 /* DPLogFormatParser.swift in Sources */,
6E896CEF2071BE3D001DC8D9 /* DPConsoleLogger.swift in Sources */,
6E896CED2071BE1E001DC8D9 /* DPLogger.swift in Sources */,
6EDB843520689DB60025D556 /* DPLog.swift in Sources */,
6E896CEB2071BD8F001DC8D9 /* DPDefaultLogFormatParser.swift in Sources */,
6E896CF12071BFDE001DC8D9 /* DPLogLevel.swift in Sources */,
6EA340CC24A9CBE4003773F8 /* DPLogDefaultFormatter.swift in Sources */,
6EA3410A24A9E556003773F8 /* DPLogObjC.m in Sources */,
6EED0EB724A9C3A000D1921A /* DPLogFormatter.swift in Sources */,
6EED0EAF24A9BA2100D1921A /* DPLogLevel.swift in Sources */,
6EED0EB324A9C1FA00D1921A /* DPLogCoordinator.swift in Sources */,
6EED0EB124A9BA5B00D1921A /* Log.swift in Sources */,
6EA340C724A9C5BC003773F8 /* DPLogInformation.swift in Sources */,
6EED0EB524A9C27100D1921A /* DPLogger.swift in Sources */,
6EA340CA24A9CB75003773F8 /* DPConsoleLogger.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -380,12 +430,14 @@
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = DPLog/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = DP.Utilities.DPLog;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
SKIP_INSTALL = YES;
SWIFT_OBJC_BRIDGING_HEADER = "";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
Expand All @@ -402,11 +454,13 @@
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = DPLog/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = DP.Utilities.DPLog;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
SKIP_INSTALL = YES;
SWIFT_VERSION = 4.0;
SWIFT_OBJC_BRIDGING_HEADER = "";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Release;
Expand All @@ -420,7 +474,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = DP.Utilities.DPLogTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
Expand All @@ -434,7 +488,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = DP.Utilities.DPLogTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Release;
Expand Down
27 changes: 0 additions & 27 deletions DPLog/Source/DPConsoleLogger.swift

This file was deleted.

Loading

0 comments on commit 0eba662

Please sign in to comment.