daily pastebin goal
61%
SHARE
TWEET

Untitled

a guest Jan 22nd, 2019 84 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import Foundation
  2.  
  3. /**
  4. This class is used to create prints in the console that can be distinguished via **log-levels** and **markup**.
  5.  */
  6.  
  7. class Log {
  8.    
  9.     /**
  10.      Prints a recognizable warning log message in the console with markup.
  11.      
  12.      - parameter message: Log message.
  13.      */
  14.     class func warning(message: String) {
  15.        print("⚠️⚠️⚠️" + " \(message) " + "⚠️⚠️⚠️")
  16.     }
  17.    
  18.     /**
  19.      Prints a recognizable error log message in the console with markup.
  20.      
  21.      - parameter message: Log message.
  22.      */
  23.     class func error(message: String) {
  24.         print("🛑🛑🛑" + " \(message) " + "🛑🛑🛑")
  25.     }
  26.    
  27.     /**
  28.      Prints a recognizable info log message in the console with markup.
  29.      
  30.      - parameter message: Log message.
  31.      */
  32.     class func info(message: String) {
  33.         print("ℹ️ℹ️ℹ️" + " \(message) " + "ℹ️ℹ️ℹ️")
  34.     }
  35.    
  36.     /**
  37.      Prints a recognizable debug log message in the console with markup.
  38.      
  39.      - parameter message: Log message.
  40.      */
  41.     class func debug(message: String) {
  42.         print("🐞🐞🐞" + " \(message) " + "🐞🐞🐞")
  43.     }
  44. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top