Compare commits
10 Commits
c82c004de7
...
b6d1ae2667
Author | SHA1 | Date | |
---|---|---|---|
|
b6d1ae2667 | ||
|
f926039511 | ||
|
ae15ee11a7 | ||
|
c6de7dfa69 | ||
|
0cde7cbcc5 | ||
|
8768f9246b | ||
|
5c33df4ca0 | ||
|
218a032557 | ||
|
b3d0a9b638 | ||
|
7ec64e5f9c |
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
@ -28,7 +28,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
sudo apt-get -y update
|
sudo apt-get -y update
|
||||||
sudo apt-get -y install tree tshark valgrind
|
sudo apt-get -y install tree tshark valgrind
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
- name: Configure
|
- name: Configure
|
||||||
run: |
|
run: |
|
||||||
set -x
|
set -x
|
||||||
|
6
.github/workflows/coverity.yml
vendored
6
.github/workflows/coverity.yml
vendored
@ -15,8 +15,8 @@ jobs:
|
|||||||
coverity:
|
coverity:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
- uses: actions/cache@v2
|
- uses: actions/cache@v3
|
||||||
id: coverity-toolchain-cache
|
id: coverity-toolchain-cache
|
||||||
with:
|
with:
|
||||||
path: cov-analysis-linux64
|
path: cov-analysis-linux64
|
||||||
@ -53,7 +53,7 @@ jobs:
|
|||||||
--form description="${PROJECT_NAME} $(git rev-parse HEAD)" \
|
--form description="${PROJECT_NAME} $(git rev-parse HEAD)" \
|
||||||
https://scan.coverity.com/builds?project=${COVERITY_PROJ}
|
https://scan.coverity.com/builds?project=${COVERITY_PROJ}
|
||||||
- name: Upload build.log
|
- name: Upload build.log
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: coverity-build.log
|
name: coverity-build.log
|
||||||
path: cov-int/build-log.txt
|
path: cov-int/build-log.txt
|
||||||
|
47
.github/workflows/release.yml
vendored
47
.github/workflows/release.yml
vendored
@ -7,38 +7,11 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
release:
|
release:
|
||||||
name: Create GitHub release
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
if: startsWith(github.ref, 'refs/tags/')
|
|
||||||
outputs:
|
|
||||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
||||||
release_id: ${{ steps.create_release.outputs.id }}
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- name: Extract ChangeLog entry ...
|
|
||||||
# Hack to extract latest entry for body_path below
|
|
||||||
run: |
|
|
||||||
awk '/-----*/{if (x == 1) exit; x=1;next}x' ChangeLog.md \
|
|
||||||
|head -n -1 > release.md
|
|
||||||
cat release.md
|
|
||||||
- name: Create release ...
|
|
||||||
id: create_release
|
|
||||||
uses: actions/create-release@v1
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
with:
|
|
||||||
tag_name: ${{ github.ref }}
|
|
||||||
release_name: sysklogd ${{ github.ref }}
|
|
||||||
body_path: release.md
|
|
||||||
draft: false
|
|
||||||
prerelease: false
|
|
||||||
tarball:
|
|
||||||
name: Build and upload release tarball
|
name: Build and upload release tarball
|
||||||
needs: release
|
|
||||||
if: startsWith(github.ref, 'refs/tags/')
|
if: startsWith(github.ref, 'refs/tags/')
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
- name: Installing dependencies ...
|
- name: Installing dependencies ...
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get -y update
|
sudo apt-get -y update
|
||||||
@ -49,14 +22,16 @@ jobs:
|
|||||||
./configure --prefix=/tmp --with-systemd=/tmp/lib/systemd/system
|
./configure --prefix=/tmp --with-systemd=/tmp/lib/systemd/system
|
||||||
- name: Build release ...
|
- name: Build release ...
|
||||||
run: |
|
run: |
|
||||||
make release || (cat sysklogd-2.3.0/_build/sub/test/start.log; cat sysklogd-2.3.0/_build/sub/test/remote.log; false)
|
make release
|
||||||
ls -lF ../
|
|
||||||
mkdir -p artifacts/
|
mkdir -p artifacts/
|
||||||
mv ../*.tar.* artifacts/
|
mv ../*.tar.* artifacts/
|
||||||
- name: Upload release artifacts ...
|
- name: Extract ChangeLog entry ...
|
||||||
uses: skx/github-action-publish-binaries@release-0.15
|
run: |
|
||||||
env:
|
awk '/-----*/{if (x == 1) exit; x=1;next}x' ChangeLog.md \
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|head -n -1 > release.md
|
||||||
|
cat release.md
|
||||||
|
- uses: ncipollo/release-action@v1
|
||||||
with:
|
with:
|
||||||
releaseId: ${{ needs.release.outputs.release_id }}
|
name: sysklogd ${{ github.ref_name }}
|
||||||
args: artifacts/*
|
bodyFile: "release.md"
|
||||||
|
artifacts: "artifacts/*"
|
||||||
|
22
ChangeLog.md
22
ChangeLog.md
@ -4,6 +4,24 @@ Change Log
|
|||||||
All relevant changes to the project are documented in this file.
|
All relevant changes to the project are documented in this file.
|
||||||
|
|
||||||
|
|
||||||
|
[v2.5.0][] - 2023-04-30
|
||||||
|
-----------------------
|
||||||
|
|
||||||
|
### Changes
|
||||||
|
- Issue #59: initial port to NuttX, contributed by Xiaomi
|
||||||
|
- Issue #61: add support for `-c` and `-cc` to disable log compression.
|
||||||
|
A single `-c` disables compression for pipes, another `-c` (or `-cc`)
|
||||||
|
disables compression for all other log targets
|
||||||
|
- The default `syslog.conf` now logs debug messages again (disabled in
|
||||||
|
v2.4.0) due to problems (confusion) reported in the field
|
||||||
|
- Dropped not recommended `KillMode=process` from systemd unit file
|
||||||
|
|
||||||
|
### Fixes
|
||||||
|
- Issue #60: document how to set side-wide permissions on log files
|
||||||
|
- Issue #62: early log messages lost when running under systemd, found
|
||||||
|
by Wind River Systems, including initial fix
|
||||||
|
|
||||||
|
|
||||||
[v2.4.4][] - 2022-08-14
|
[v2.4.4][] - 2022-08-14
|
||||||
-----------------------
|
-----------------------
|
||||||
|
|
||||||
@ -525,7 +543,9 @@ and a replacement for `syslog.h` to enable new features in RFC5424.
|
|||||||
- Several bugfixes and improvements, please refer to the .c files
|
- Several bugfixes and improvements, please refer to the .c files
|
||||||
|
|
||||||
|
|
||||||
[UNRELEASED]: https://github.com/troglobit/sysklogd/compare/v2.4.3...HEAD
|
[UNRELEASED]: https://github.com/troglobit/sysklogd/compare/v2.5.0...HEAD
|
||||||
|
[v2.5.0]: https://github.com/troglobit/sysklogd/compare/v2.4.4...v2.5.0
|
||||||
|
[v2.4.4]: https://github.com/troglobit/sysklogd/compare/v2.4.3...v2.4.4
|
||||||
[v2.4.3]: https://github.com/troglobit/sysklogd/compare/v2.4.2...v2.4.3
|
[v2.4.3]: https://github.com/troglobit/sysklogd/compare/v2.4.2...v2.4.3
|
||||||
[v2.4.2]: https://github.com/troglobit/sysklogd/compare/v2.4.1...v2.4.2
|
[v2.4.2]: https://github.com/troglobit/sysklogd/compare/v2.4.1...v2.4.2
|
||||||
[v2.4.1]: https://github.com/troglobit/sysklogd/compare/v2.4.0...v2.4.1
|
[v2.4.1]: https://github.com/troglobit/sysklogd/compare/v2.4.0...v2.4.1
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Copyright (c) 2018-2021 Joachim Wiberg <troglobit@gmail.com>
|
# Copyright (c) 2018-2023 Joachim Wiberg <troglobit@gmail.com>
|
||||||
# All rights reserved.
|
# All rights reserved.
|
||||||
#
|
#
|
||||||
# Redistribution and use in source and binary forms, with or without
|
# Redistribution and use in source and binary forms, with or without
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Copyright (c) 2018-2021 Joachim Wiberg <troglobit@gmail.com>
|
# Copyright (c) 2018-2023 Joachim Wiberg <troglobit@gmail.com>
|
||||||
# All rights reserved.
|
# All rights reserved.
|
||||||
#
|
#
|
||||||
# Redistribution and use in source and binary forms, with or without
|
# Redistribution and use in source and binary forms, with or without
|
||||||
@ -25,7 +25,7 @@
|
|||||||
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
# SUCH DAMAGE.
|
# SUCH DAMAGE.
|
||||||
|
|
||||||
AC_INIT([sysklogd], [2.4.4], [https://github.com/troglobit/sysklogd/issues],,
|
AC_INIT([sysklogd], [2.5.0], [https://github.com/troglobit/sysklogd/issues],,
|
||||||
[https://github.com/troglobit/sysklogd])
|
[https://github.com/troglobit/sysklogd])
|
||||||
AC_CONFIG_AUX_DIR(aux)
|
AC_CONFIG_AUX_DIR(aux)
|
||||||
AM_INIT_AUTOMAKE([1.11 foreign subdir-objects])
|
AM_INIT_AUTOMAKE([1.11 foreign subdir-objects])
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/* Replacement in case utimensat(2) is missing
|
/* Replacement in case utimensat(2) is missing
|
||||||
*
|
*
|
||||||
* Copyright (C) 2017-2021 Joachim Wiberg <troglobit@gmail.com>
|
* Copyright (C) 2017-2023 Joachim Wiberg <troglobit@gmail.com>
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for any
|
* Permission to use, copy, modify, and/or distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
@ -21,12 +21,20 @@
|
|||||||
#endif
|
#endif
|
||||||
#include <sys/time.h> /* lutimes(), utimes(), utimensat() */
|
#include <sys/time.h> /* lutimes(), utimes(), utimensat() */
|
||||||
|
|
||||||
|
#ifndef TIMESPEC_TO_TIMEVAL
|
||||||
|
#define TIMESPEC_TO_TIMEVAL(tv, ts) { \
|
||||||
|
(tv)->tv_sec = (ts)->tv_sec; \
|
||||||
|
(tv)->tv_usec = (ts)->tv_nsec / 1000; \
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
int
|
int
|
||||||
__utimensat(int dirfd, const char *pathname, const struct timespec ts[2], int flags)
|
__utimensat(int dirfd, const char *pathname, const struct timespec ts[2], int flags)
|
||||||
{
|
{
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
struct timeval tv[2];
|
struct timeval tv[2];
|
||||||
|
|
||||||
|
(void)flags;
|
||||||
if (dirfd != 0) {
|
if (dirfd != 0) {
|
||||||
errno = ENOTSUP;
|
errno = ENOTSUP;
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Copyright (c) 2018-2021 Joachim Wiberg <troglobit@gmail.com>
|
# Copyright (c) 2018-2023 Joachim Wiberg <troglobit@gmail.com>
|
||||||
# All rights reserved.
|
# All rights reserved.
|
||||||
#
|
#
|
||||||
# Redistribution and use in source and binary forms, with or without
|
# Redistribution and use in source and binary forms, with or without
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
.\" -*- nroff -*-
|
.\" -*- nroff -*-
|
||||||
.\" Copyright (c) 2018-2022 Joachim Wiberg <troglobit@gmail.com>
|
.\" Copyright (c) 2018-2023 Joachim Wiberg <troglobit@gmail.com>
|
||||||
.\" All rights reserved.
|
.\" All rights reserved.
|
||||||
.\"
|
.\"
|
||||||
.\" Redistribution and use in source and binary forms, with or without
|
.\" Redistribution and use in source and binary forms, with or without
|
||||||
@ -25,7 +25,7 @@
|
|||||||
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||||
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
.\" SUCH DAMAGE.
|
.\" SUCH DAMAGE.
|
||||||
.Dd August 1, 2022
|
.Dd April 30, 2023
|
||||||
.Dt LOGGER 1
|
.Dt LOGGER 1
|
||||||
.Os sysklogd
|
.Os sysklogd
|
||||||
.Sh NAME
|
.Sh NAME
|
||||||
|
@ -38,7 +38,7 @@
|
|||||||
.Nd log systems messages
|
.Nd log systems messages
|
||||||
.Sh SYNOPSIS
|
.Sh SYNOPSIS
|
||||||
.Nm
|
.Nm
|
||||||
.Op Fl ?468AdFHKknsTtv
|
.Op Fl ?468AcdFHKknsTtv
|
||||||
.Op Fl a Ar addr[/len][:port]
|
.Op Fl a Ar addr[/len][:port]
|
||||||
.Op Fl a Ar name[:port]
|
.Op Fl a Ar name[:port]
|
||||||
.Op Fl b Ar addr[:port]
|
.Op Fl b Ar addr[:port]
|
||||||
@ -245,6 +245,12 @@ relies on this file being removed at system reboot. The default
|
|||||||
location depends on the system and how
|
location depends on the system and how
|
||||||
.Nm
|
.Nm
|
||||||
was configured.
|
was configured.
|
||||||
|
.It Fl c
|
||||||
|
Disable the compression of repeated instances of the same line into a
|
||||||
|
single line of the form
|
||||||
|
.Dq Li "last message repeated N times"
|
||||||
|
when the output is a pipe to another program. If specified twice,
|
||||||
|
disable this compression in all cases.
|
||||||
.It Fl d
|
.It Fl d
|
||||||
Put
|
Put
|
||||||
.Nm
|
.Nm
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Copyright (c) 2018-2021 Joachim Wiberg <troglobit@gmail.com>
|
# Copyright (c) 2018-2023 Joachim Wiberg <troglobit@gmail.com>
|
||||||
# All rights reserved.
|
# All rights reserved.
|
||||||
#
|
#
|
||||||
# Redistribution and use in source and binary forms, with or without
|
# Redistribution and use in source and binary forms, with or without
|
||||||
@ -33,7 +33,7 @@ if ENABLE_LOGGER
|
|||||||
bin_PROGRAMS += logger
|
bin_PROGRAMS += logger
|
||||||
endif
|
endif
|
||||||
|
|
||||||
AM_CFLAGS = -W -Wall -Wextra -std=c99
|
AM_CFLAGS = -W -Wall -Wextra -std=c99 -gdwarf-4
|
||||||
AM_CFLAGS += -Wno-unused-result -Wno-unused-parameter -fno-strict-aliasing
|
AM_CFLAGS += -Wno-unused-result -Wno-unused-parameter -fno-strict-aliasing
|
||||||
AM_CPPFLAGS = -DSYSCONFDIR=\"@sysconfdir@\" -DRUNSTATEDIR=\"@runstatedir@\"
|
AM_CPPFLAGS = -DSYSCONFDIR=\"@sysconfdir@\" -DRUNSTATEDIR=\"@runstatedir@\"
|
||||||
AM_CPPFLAGS += -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_GNU_SOURCE
|
AM_CPPFLAGS += -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_GNU_SOURCE
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*-
|
/*-
|
||||||
* SPDX-License-Identifier: BSD-3-Clause
|
* SPDX-License-Identifier: BSD-3-Clause
|
||||||
*
|
*
|
||||||
* Copyright (c) 2018-2021 Joachim Wiberg <troglobit@gmail.com>
|
* Copyright (c) 2018-2023 Joachim Wiberg <troglobit@gmail.com>
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*-
|
/*-
|
||||||
* SPDX-License-Identifier: BSD-3-Clause
|
* SPDX-License-Identifier: BSD-3-Clause
|
||||||
*
|
*
|
||||||
* Copyright (C) 2017-2021 Joachim Wiberg <troglobit@gmail.com>
|
* Copyright (C) 2017-2023 Joachim Wiberg <troglobit@gmail.com>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*-
|
/*-
|
||||||
* SPDX-License-Identifier: BSD-3-Clause
|
* SPDX-License-Identifier: BSD-3-Clause
|
||||||
*
|
*
|
||||||
* Copyright (C) 2017-2021 Joachim Wiberg <troglobit@gmail.com>
|
* Copyright (C) 2017-2023 Joachim Wiberg <troglobit@gmail.com>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
|
@ -144,6 +144,7 @@ static int MarkInterval = 20 * 60; /* interval between marks in seconds */
|
|||||||
static int family = PF_UNSPEC; /* protocol family (IPv4, IPv6 or both) */
|
static int family = PF_UNSPEC; /* protocol family (IPv4, IPv6 or both) */
|
||||||
static int mask_C1 = 1; /* mask characters from 0x80 - 0x9F */
|
static int mask_C1 = 1; /* mask characters from 0x80 - 0x9F */
|
||||||
static int send_to_all; /* send message to all IPv4/IPv6 addresses */
|
static int send_to_all; /* send message to all IPv4/IPv6 addresses */
|
||||||
|
static int no_compress; /* don't compress messages (1=pipes, 2=all) */
|
||||||
static int secure_opt; /* sink for others, log to remote, or only unix domain socks */
|
static int secure_opt; /* sink for others, log to remote, or only unix domain socks */
|
||||||
static int secure_mode; /* same as above but from syslog.conf, only if cmdline unset */
|
static int secure_mode; /* same as above but from syslog.conf, only if cmdline unset */
|
||||||
|
|
||||||
@ -193,6 +194,7 @@ void untty(void);
|
|||||||
static void parsemsg(const char *from, char *msg);
|
static void parsemsg(const char *from, char *msg);
|
||||||
static int opensys(const char *file);
|
static int opensys(const char *file);
|
||||||
static void printsys(char *msg);
|
static void printsys(char *msg);
|
||||||
|
static void unix_cb(int sd, void *arg);
|
||||||
static void logmsg(struct buf_msg *buffer);
|
static void logmsg(struct buf_msg *buffer);
|
||||||
static void logrotate(struct filed *f);
|
static void logrotate(struct filed *f);
|
||||||
static void rotate_file(struct filed *f, struct stat *stp_or_null);
|
static void rotate_file(struct filed *f, struct stat *stp_or_null);
|
||||||
@ -395,7 +397,7 @@ int main(int argc, char *argv[])
|
|||||||
char *ptr;
|
char *ptr;
|
||||||
int ch;
|
int ch;
|
||||||
|
|
||||||
while ((ch = getopt(argc, argv, "468Aa:b:C:dHFf:Kkm:nP:p:r:sTtv?")) != EOF) {
|
while ((ch = getopt(argc, argv, "468Aa:b:C:cdHFf:Kkm:nP:p:r:sTtv?")) != EOF) {
|
||||||
switch ((char)ch) {
|
switch ((char)ch) {
|
||||||
case '4':
|
case '4':
|
||||||
family = PF_INET;
|
family = PF_INET;
|
||||||
@ -433,6 +435,10 @@ int main(int argc, char *argv[])
|
|||||||
CacheFile = optarg;
|
CacheFile = optarg;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 'c':
|
||||||
|
no_compress++;
|
||||||
|
break;
|
||||||
|
|
||||||
case 'd': /* debug */
|
case 'd': /* debug */
|
||||||
Debug = 1;
|
Debug = 1;
|
||||||
Foreground = 1;
|
Foreground = 1;
|
||||||
@ -521,12 +527,20 @@ int main(int argc, char *argv[])
|
|||||||
.pe_serv = "syslog",
|
.pe_serv = "syslog",
|
||||||
});
|
});
|
||||||
|
|
||||||
/* Default to _PATH_LOG for the UNIX domain socket */
|
/* Figure out where to read system log messages from */
|
||||||
if (!pflag)
|
if (!pflag) {
|
||||||
addpeer(&(struct peer) {
|
/* Do we run under systemd-journald (Requires=syslog.socket)? */
|
||||||
.pe_name = _PATH_LOG,
|
if (fcntl(3, F_GETFD) != -1) {
|
||||||
.pe_mode = 0666,
|
if (socket_register(3, NULL, unix_cb, NULL) == -1)
|
||||||
});
|
err(1, "failed registering syslog.socket (3)");
|
||||||
|
} else {
|
||||||
|
/* Default to _PATH_LOG for the UNIX domain socket */
|
||||||
|
addpeer(&(struct peer) {
|
||||||
|
.pe_name = _PATH_LOG,
|
||||||
|
.pe_mode = 0666,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!Foreground && !Debug) {
|
if (!Foreground && !Debug) {
|
||||||
ppid = waitdaemon(30);
|
ppid = waitdaemon(30);
|
||||||
@ -1671,7 +1685,8 @@ static void logmsg(struct buf_msg *buffer)
|
|||||||
/*
|
/*
|
||||||
* suppress duplicate lines to this file
|
* suppress duplicate lines to this file
|
||||||
*/
|
*/
|
||||||
if ((buffer->flags & MARK) == 0 && savedlen == f->f_prevlen &&
|
if (no_compress - (f->f_type != F_PIPE) < 1 &&
|
||||||
|
(buffer->flags & MARK) == 0 && savedlen == f->f_prevlen &&
|
||||||
!strcmp(saved, f->f_prevline)) {
|
!strcmp(saved, f->f_prevline)) {
|
||||||
f->f_lasttime = buffer->timestamp;
|
f->f_lasttime = buffer->timestamp;
|
||||||
f->f_prevcount++;
|
f->f_prevcount++;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*-
|
/*-
|
||||||
* SPDX-License-Identifier: BSD-3-Clause
|
* SPDX-License-Identifier: BSD-3-Clause
|
||||||
*
|
*
|
||||||
* Copyright (C) 2017-2021 Joachim Wiberg <troglobit@gmail.com>
|
* Copyright (C) 2017-2023 Joachim Wiberg <troglobit@gmail.com>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
@ -106,7 +106,7 @@ static int __timer_start(void)
|
|||||||
if (sec <= 0)
|
if (sec <= 0)
|
||||||
sec = 1;
|
sec = 1;
|
||||||
|
|
||||||
return alarm(sec);
|
return alarm((unsigned int)sec);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*-
|
/*-
|
||||||
* SPDX-License-Identifier: BSD-3-Clause
|
* SPDX-License-Identifier: BSD-3-Clause
|
||||||
*
|
*
|
||||||
* Copyright (C) 2017-2021 Joachim Wiberg <troglobit@gmail.com>
|
* Copyright (C) 2017-2023 Joachim Wiberg <troglobit@gmail.com>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
|
@ -7,11 +7,7 @@
|
|||||||
# First some standard log files. Log by facility.
|
# First some standard log files. Log by facility.
|
||||||
#
|
#
|
||||||
auth,authpriv.* /var/log/auth.log
|
auth,authpriv.* /var/log/auth.log
|
||||||
|
*.*;auth,authpriv.none -/var/log/syslog
|
||||||
# Everything except debug and security tokens, re-enable debug by
|
|
||||||
# dropping '*.!=debug;', or enable /var/log/debug below
|
|
||||||
*.*;*.!=debug;\
|
|
||||||
auth,authpriv.none -/var/log/syslog
|
|
||||||
|
|
||||||
#cron.* /var/log/cron.log
|
#cron.* /var/log/cron.log
|
||||||
#daemon.* -/var/log/daemon.log
|
#daemon.* -/var/log/daemon.log
|
||||||
|
@ -6,7 +6,7 @@ Requires=syslog.socket
|
|||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
EnvironmentFile=-@SYSCONFDIR@/default/syslogd
|
EnvironmentFile=-@SYSCONFDIR@/default/syslogd
|
||||||
ExecStart=@SBINDIR@/syslogd -F -p /run/systemd/journal/syslog $SYSLOGD_OPTS
|
ExecStart=@SBINDIR@/syslogd -F $SYSLOGD_OPTS
|
||||||
StandardOutput=null
|
StandardOutput=null
|
||||||
Restart=on-failure
|
Restart=on-failure
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user