LogLevel returns the global log level. The levels follow Logrus's log level scheme. This value is based off of: - The $CF_LOG_LEVEL and an int/warn/info/etc... - Defaults to PANIC/0 (ie no logging)
()
| 109 | // - The $CF_LOG_LEVEL and an int/warn/info/etc... |
| 110 | // - Defaults to PANIC/0 (ie no logging) |
| 111 | func (config *Config) LogLevel() int { |
| 112 | if config.ENV.CFLogLevel != "" { |
| 113 | envVal, err := strconv.ParseInt(config.ENV.CFLogLevel, 10, 32) |
| 114 | if err == nil { |
| 115 | return int(envVal) |
| 116 | } |
| 117 | |
| 118 | switch strings.ToLower(config.ENV.CFLogLevel) { |
| 119 | case "fatal": |
| 120 | return 1 |
| 121 | case "error": |
| 122 | return 2 |
| 123 | case "warn": |
| 124 | return 3 |
| 125 | case "info": |
| 126 | return 4 |
| 127 | case "debug": |
| 128 | return 5 |
| 129 | } |
| 130 | } |
| 131 | |
| 132 | return 0 |
| 133 | } |
| 134 | |
| 135 | // StagingTimeout returns the max time an application staging should take. The |
| 136 | // time is based off of: |
no outgoing calls
no test coverage detected