-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: support on UploadFile
- Loading branch information
Showing
17 changed files
with
521 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
// | ||
// AliyunpanLogger.swift | ||
// AliyunpanSDK | ||
// | ||
// Created by zhaixian on 2024/3/14. | ||
// | ||
|
||
import Foundation | ||
|
||
public enum AliyunpanLogLevel: Int { | ||
case debug | ||
case info | ||
case warn | ||
case error | ||
|
||
var msg: String { | ||
switch self { | ||
case .debug: | ||
return "DEBUG" | ||
case .info: | ||
return "INFO" | ||
case .warn: | ||
return "⚠️" | ||
case .error: | ||
return "❌" | ||
} | ||
} | ||
} | ||
|
||
class Logger { | ||
static func log(_ level: AliyunpanLogLevel, msg: String) { | ||
guard level.rawValue >= Aliyunpan.logLevel.rawValue else { | ||
return | ||
} | ||
print("[AliyunpanSDK][\(level.msg)]\(msg)") | ||
} | ||
} |
Oops, something went wrong.