diff options
Diffstat (limited to 'sysklogd')
| -rw-r--r-- | sysklogd/syslogd.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/sysklogd/syslogd.c b/sysklogd/syslogd.c index 49deab2d7..8845bb41b 100644 --- a/sysklogd/syslogd.c +++ b/sysklogd/syslogd.c | |||
| @@ -35,6 +35,7 @@ | |||
| 35 | #include <paths.h> | 35 | #include <paths.h> |
| 36 | #include <signal.h> | 36 | #include <signal.h> |
| 37 | #include <stdarg.h> | 37 | #include <stdarg.h> |
| 38 | #include <stdbool.h> | ||
| 38 | #include <time.h> | 39 | #include <time.h> |
| 39 | #include <string.h> | 40 | #include <string.h> |
| 40 | #include <unistd.h> | 41 | #include <unistd.h> |
| @@ -88,6 +89,9 @@ static int doRemoteLog = FALSE; | |||
| 88 | static int local_logging = FALSE; | 89 | static int local_logging = FALSE; |
| 89 | #endif | 90 | #endif |
| 90 | 91 | ||
| 92 | /* Make loging output smaller. */ | ||
| 93 | static bool small = false; | ||
| 94 | |||
| 91 | 95 | ||
| 92 | #define MAXLINE 1024 /* maximum line length */ | 96 | #define MAXLINE 1024 /* maximum line length */ |
| 93 | 97 | ||
| @@ -428,8 +432,13 @@ static void logMessage(int pri, char *msg) | |||
| 428 | } | 432 | } |
| 429 | if (local_logging == TRUE) | 433 | if (local_logging == TRUE) |
| 430 | #endif | 434 | #endif |
| 435 | { | ||
| 431 | /* now spew out the message to wherever it is supposed to go */ | 436 | /* now spew out the message to wherever it is supposed to go */ |
| 432 | message("%s %s %s %s\n", timestamp, LocalHostName, res, msg); | 437 | if (small) |
| 438 | message("%s %s\n", timestamp, msg); | ||
| 439 | else | ||
| 440 | message("%s %s %s %s\n", timestamp, LocalHostName, res, msg); | ||
| 441 | } | ||
| 433 | } | 442 | } |
| 434 | 443 | ||
| 435 | static void quit_signal(int sig) | 444 | static void quit_signal(int sig) |
| @@ -666,6 +675,9 @@ extern int syslogd_main(int argc, char **argv) | |||
| 666 | circular_logging = TRUE; | 675 | circular_logging = TRUE; |
| 667 | break; | 676 | break; |
| 668 | #endif | 677 | #endif |
| 678 | case 'S': | ||
| 679 | small = true; | ||
| 680 | break; | ||
| 669 | default: | 681 | default: |
| 670 | bb_show_usage(); | 682 | bb_show_usage(); |
| 671 | } | 683 | } |
