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