mirror of
				https://github.com/wizbright/waybox.git
				synced 2025-11-03 09:01:45 -05:00 
			
		
		
		
	Simplified debug-level code a bit
This commit is contained in:
		
							parent
							
								
									73460ae133
								
							
						
					
					
						commit
						6a5931bcb0
					
				
					 1 changed files with 3 additions and 3 deletions
				
			
		| 
						 | 
					@ -27,12 +27,12 @@ int main(int argc, char **argv) {
 | 
				
			||||||
	textdomain(GETTEXT_PACKAGE);
 | 
						textdomain(GETTEXT_PACKAGE);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	char *startup_cmd = NULL;
 | 
						char *startup_cmd = NULL;
 | 
				
			||||||
	bool debug = false;
 | 
						enum wlr_log_importance debuglevel = WLR_ERROR;
 | 
				
			||||||
	if (argc > 1) {
 | 
						if (argc > 1) {
 | 
				
			||||||
		int i;
 | 
							int i;
 | 
				
			||||||
		for (i = 0; i < argc; i++) {
 | 
							for (i = 0; i < argc; i++) {
 | 
				
			||||||
			if (!strcmp("--debug", argv[i]) || !strcmp("-v", argv[i])) {
 | 
								if (!strcmp("--debug", argv[i]) || !strcmp("-v", argv[i])) {
 | 
				
			||||||
				debug = true;
 | 
									debuglevel = WLR_INFO;
 | 
				
			||||||
			} else if ((!strcmp("--startup", argv[i]) || !strcmp("-s", argv[i]))) {
 | 
								} else if ((!strcmp("--startup", argv[i]) || !strcmp("-s", argv[i]))) {
 | 
				
			||||||
				if (i < argc - 1) {
 | 
									if (i < argc - 1) {
 | 
				
			||||||
					startup_cmd = argv[i + 1];
 | 
										startup_cmd = argv[i + 1];
 | 
				
			||||||
| 
						 | 
					@ -58,7 +58,7 @@ int main(int argc, char **argv) {
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	wlr_log_init(debug ? WLR_DEBUG : WLR_ERROR, NULL);
 | 
						wlr_log_init(debuglevel, NULL);
 | 
				
			||||||
	struct wb_server server = {0};
 | 
						struct wb_server server = {0};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (wb_create_backend(&server)) {
 | 
						if (wb_create_backend(&server)) {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue