Translate last unusual logging calls
This commit is contained in:
		
							parent
							
								
									58dc09b415
								
							
						
					
					
						commit
						38dced7591
					
				| @ -26,10 +26,6 @@ | ||||
| #define VERSION "version info needed" | ||||
| #endif | ||||
| 
 | ||||
| #define MSG 1 | ||||
| #define INFO 2 | ||||
| #define DEBUG 3 | ||||
| 
 | ||||
| typedef struct _x11_source { | ||||
|         GSource source; | ||||
|         Display *dpy; | ||||
|  | ||||
| @ -34,7 +34,7 @@ static int regex_init(void) | ||||
|             "(\\([-[:alnum:]_\\@;/?:&=%$.+!*\x27,~#]*\\)|[-[:alnum:]_\\@;/?:&=%$+*~])+"; | ||||
|         int ret = regcomp(&cregex, regex, REG_EXTENDED | REG_ICASE); | ||||
|         if (ret != 0) { | ||||
|                 fputs("failed to compile regex", stderr); | ||||
|                 LOG_W("Failed to compile regex."); | ||||
|                 return 0; | ||||
|         } else { | ||||
|                 is_initialized = true; | ||||
|  | ||||
| @ -331,8 +331,7 @@ static int FollowXErrorHandler(Display *display, XErrorEvent *e) | ||||
|         dunst_follow_errored = true; | ||||
|         char err_buf[BUFSIZ]; | ||||
|         XGetErrorText(display, e->error_code, err_buf, BUFSIZ); | ||||
|         fputs(err_buf, stderr); | ||||
|         fputs("\n", stderr); | ||||
|         LOG_W("%s", err_buf); | ||||
| 
 | ||||
|         return 0; | ||||
| } | ||||
|  | ||||
							
								
								
									
										10
									
								
								src/x11/x.c
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								src/x11/x.c
									
									
									
									
									
								
							| @ -832,7 +832,7 @@ gboolean x_mainloop_fd_prepare(GSource *source, gint *timeout) | ||||
|         if (timeout) | ||||
|                 *timeout = -1; | ||||
|         else | ||||
|                 g_print("BUG: x_mainloop_fd_prepare: timeout == NULL\n"); | ||||
|                 LOG_E("x_mainloop_fd_prepare: timeout == NULL"); | ||||
|         return false; | ||||
| } | ||||
| 
 | ||||
| @ -992,7 +992,7 @@ void x_setup(void) | ||||
| 
 | ||||
|         /* initialize xctx.dc, font, keyboard, colors */ | ||||
|         if (!setlocale(LC_CTYPE, "") || !XSupportsLocale()) | ||||
|                 fputs("no locale support\n", stderr); | ||||
|                 LOG_W("No locale support"); | ||||
|         if (!(xctx.dpy = XOpenDisplay(NULL))) { | ||||
|                 DIE("Cannot open X11 display."); | ||||
|         } | ||||
| @ -1244,11 +1244,11 @@ static int GrabXErrorHandler(Display *display, XErrorEvent *e) | ||||
|         dunst_grab_errored = true; | ||||
|         char err_buf[BUFSIZ]; | ||||
|         XGetErrorText(display, e->error_code, err_buf, BUFSIZ); | ||||
|         fputs(err_buf, stderr); | ||||
|         fputs("\n", stderr); | ||||
| 
 | ||||
|         if (e->error_code != BadAccess) { | ||||
|                 exit(EXIT_FAILURE); | ||||
|                 DIE("%s", err_buf); | ||||
|         } else { | ||||
|                 LOG_W("%s", err_buf); | ||||
|         } | ||||
| 
 | ||||
|         return 0; | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Benedikt Heine
						Benedikt Heine