i3-dump-log: make log message a little more clear (#3618)

This came up when trying to debug an issue.
This commit is contained in:
Michael Stapelberg 2019-02-12 09:22:26 +01:00 committed by GitHub
parent e2d6117b8c
commit 2d6e09a66a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -155,7 +155,7 @@ int main(int argc, char *argv[]) {
exit(1); exit(1);
} }
if (root_atom_contents("I3_CONFIG_PATH", conn, screen) != NULL) { if (root_atom_contents("I3_CONFIG_PATH", conn, screen) != NULL) {
fprintf(stderr, "i3-dump-log: ERROR: i3 is running, but SHM logging is not enabled. Enabling SHM log until cancelled\n\n"); fprintf(stderr, "i3-dump-log: i3 is running, but SHM logging is not enabled. Enabling SHM log now while i3-dump-log is running\n\n");
ipcfd = ipc_connect(NULL); ipcfd = ipc_connect(NULL);
const char *enablecmd = "debuglog on; shmlog 5242880"; const char *enablecmd = "debuglog on; shmlog 5242880";
if (ipc_send_message(ipcfd, strlen(enablecmd), if (ipc_send_message(ipcfd, strlen(enablecmd),

View File

@ -31,7 +31,7 @@ run [ 'i3-dump-log' ],
'>', \$stdout, '>', \$stdout,
'2>', \$stderr; '2>', \$stderr;
like($stderr, qr#^i3-dump-log: ERROR: i3 is running, but SHM logging is not enabled\.#, like($stderr, qr#^i3-dump-log: i3 is running, but SHM logging is not enabled\.#,
'shm logging not enabled'); 'shm logging not enabled');
################################################################################ ################################################################################
@ -73,7 +73,7 @@ run [ 'i3-dump-log' ],
'>', \$stdout, '>', \$stdout,
'2>', \$stderr; '2>', \$stderr;
like($stderr, qr#^i3-dump-log: ERROR: i3 is running, but SHM logging is not enabled\.#, like($stderr, qr#^i3-dump-log: i3 is running, but SHM logging is not enabled\.#,
'shm logging not enabled'); 'shm logging not enabled');
done_testing; done_testing;