| 56 | } |
| 57 | |
| 58 | func PrintVerbose(msg string, c int, threshold int) { |
| 59 | switch c { |
| 60 | case Red: |
| 61 | PrintLog("[ERR] " + msg) |
| 62 | msg = color.RedString("[ERR] ") + msg |
| 63 | case Yellow: |
| 64 | PrintLog("[!] " + msg) |
| 65 | msg = color.YellowString("[!] ") + msg |
| 66 | case Green: |
| 67 | PrintLog("[+] " + msg) |
| 68 | msg = color.GreenString("[+] ") + msg |
| 69 | case Cyan: |
| 70 | PrintLog("[*] " + msg) |
| 71 | msg = color.CyanString("[*] ") + msg |
| 72 | default: |
| 73 | PrintLog(msg) |
| 74 | } |
| 75 | |
| 76 | if Config.Verbosity >= threshold || !Config.Intitialized { |
| 77 | fmt.Print(msg) |
| 78 | } |
| 79 | } |
| 80 | |
| 81 | func Print(msg string, c int) { |
| 82 | PrintVerbose(msg, c, 0) |