verbosity is stupid lets call it log-level
This commit is contained in:
		
							
								
								
									
										14
									
								
								run
									
									
									
									
									
								
							
							
						
						
									
										14
									
								
								run
									
									
									
									
									
								
							| @@ -19,12 +19,12 @@ source "${0:a:h}/zsh/lib/import.driver.zsh" || exit 42 | |||||||
| 		  runtime | 		  runtime | ||||||
| 		    -y, --yes              auto-accept all [yn] prompts through current scwrypt | 		    -y, --yes              auto-accept all [yn] prompts through current scwrypt | ||||||
| 		    -e, --env <env-name>   set environment; overwrites SCWRYPTS_ENV | 		    -e, --env <env-name>   set environment; overwrites SCWRYPTS_ENV | ||||||
| 		    -n                     shorthand for "--verbosity 0" | 		    -n                     shorthand for "--log-level 0" | ||||||
| 		    -v, --verbosity [0-4]  set scwrypts log level to one of the following: | 		    -v, --log-level [0-4]  set scwrypts log level to one of the following: | ||||||
| 			                         0 : only command output and critical failures; skips logfile | 			                         0 : only command output and critical failures; skips logfile | ||||||
| 			                         1 : add success / failure messages | 			                         1 : add success / failure messages | ||||||
| 			                         2 : (default) include status update messages | 			                         2 : (default) include status update messages | ||||||
| 			                         3 : include warning messages | 									 3 : (CI default) include warning messages | ||||||
| 			                         4 : include debug messages | 			                         4 : include debug messages | ||||||
|  |  | ||||||
| 		  alternate commands | 		  alternate commands | ||||||
| @@ -138,8 +138,8 @@ source "${0:a:h}/zsh/lib/import.driver.zsh" || exit 42 | |||||||
| 				[[ $1 =~ ^--no-log$ ]] && WARNING 'the --no-log flag is deprecated and will be removed in scwrypts v4.2' | 				[[ $1 =~ ^--no-log$ ]] && WARNING 'the --no-log flag is deprecated and will be removed in scwrypts v4.2' | ||||||
| 				;; | 				;; | ||||||
|  |  | ||||||
| 			-v | --verbosity ) | 			-v | --log-level ) | ||||||
| 				[[ $2 =~ ^[0-4]$ ]] || ERROR "invalid setting for verbosity '$2'" | 				[[ $2 =~ ^[0-4]$ ]] || ERROR "invalid setting for log-level '$2'" | ||||||
| 				SCWRYPTS_LOG_LEVEL=$2 | 				SCWRYPTS_LOG_LEVEL=$2 | ||||||
| 				shift 1 | 				shift 1 | ||||||
| 				;; | 				;; | ||||||
| @@ -336,7 +336,7 @@ source "${0:a:h}/zsh/lib/import.driver.zsh" || exit 42 | |||||||
| 				script    : $SCWRYPT_GROUP $SCWRYPT_TYPE $SCWRYPT_NAME | 				script    : $SCWRYPT_GROUP $SCWRYPT_TYPE $SCWRYPT_NAME | ||||||
| 				run at    : $(date) | 				run at    : $(date) | ||||||
| 				config    : $ENV_NAME | 				config    : $ENV_NAME | ||||||
| 				verbosity : $SCWRYPTS_LOG_LEVEL | 				log level : $SCWRYPTS_LOG_LEVEL | ||||||
| 				\\033[1;33m--- SCWRYPT BEGIN ---------------------------------------------------\\033[0m | 				\\033[1;33m--- SCWRYPT BEGIN ---------------------------------------------------\\033[0m | ||||||
| 			" | sed 's/^\s\+//; 1d' | 			" | sed 's/^\s\+//; 1d' | ||||||
| 		) | 		) | ||||||
| @@ -353,6 +353,8 @@ source "${0:a:h}/zsh/lib/import.driver.zsh" || exit 42 | |||||||
| 	### run the scwrypt ################################################# | 	### run the scwrypt ################################################# | ||||||
| 	##################################################################### | 	##################################################################### | ||||||
|  |  | ||||||
|  | 	[ ! $SUBSCWRYPT ] && export SUBSCWRYPT=0 | ||||||
|  |  | ||||||
| 	set -o pipefail | 	set -o pipefail | ||||||
| 	{ | 	{ | ||||||
| 		[ $HEADER ] && echo $HEADER | 		[ $HEADER ] && echo $HEADER | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user