Module: PrivacyLog
- Defined in:
- lib/cocoapods-privacy/privacy/PrivacyLog.rb
Class Method Summary collapse
-
.clean_result_log ⇒ Object
清除结果log文件.
-
.result_log_tip ⇒ Object
提示log 存放地址.
-
.write_to_result_log(log) ⇒ Object
写入结果log 文件.
Class Method Details
.clean_result_log ⇒ Object
清除结果log文件
22 23 24 25 26 27 |
# File 'lib/cocoapods-privacy/privacy/PrivacyLog.rb', line 22 def self.clean_result_log() File.open(PrivacyUtils.cache_log_file, "w") do |file| # 写入空字符串,清空文件内容 file.write("") end end |
.result_log_tip ⇒ Object
提示log 存放地址
6 7 8 |
# File 'lib/cocoapods-privacy/privacy/PrivacyLog.rb', line 6 def self.result_log_tip() puts "详细log请查看 #{PrivacyUtils.cache_log_file} 文件" end |
.write_to_result_log(log) ⇒ Object
写入结果log 文件
11 12 13 14 15 16 17 18 19 |
# File 'lib/cocoapods-privacy/privacy/PrivacyLog.rb', line 11 def self.write_to_result_log(log) log_file_path = PrivacyUtils.cache_log_file is_create = PrivacyUtils.create_file_and_fold_if_no_exit(log_file_path,log) unless is_create File.open(log_file_path, "a") do |file| file << log end end end |