87d2c1ff6a7375f03476767e6f59454bcc5cd04bLennart Poettering This file is part of systemd.
87d2c1ff6a7375f03476767e6f59454bcc5cd04bLennart Poettering Copyright 2011 Lennart Poettering
87d2c1ff6a7375f03476767e6f59454bcc5cd04bLennart Poettering systemd is free software; you can redistribute it and/or modify it
5430f7f2bc7330f3088b894166bf3524a067e3d8Lennart Poettering under the terms of the GNU Lesser General Public License as published by
5430f7f2bc7330f3088b894166bf3524a067e3d8Lennart Poettering the Free Software Foundation; either version 2.1 of the License, or
87d2c1ff6a7375f03476767e6f59454bcc5cd04bLennart Poettering (at your option) any later version.
87d2c1ff6a7375f03476767e6f59454bcc5cd04bLennart Poettering systemd is distributed in the hope that it will be useful, but
87d2c1ff6a7375f03476767e6f59454bcc5cd04bLennart Poettering WITHOUT ANY WARRANTY; without even the implied warranty of
87d2c1ff6a7375f03476767e6f59454bcc5cd04bLennart Poettering MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
5430f7f2bc7330f3088b894166bf3524a067e3d8Lennart Poettering Lesser General Public License for more details.
5430f7f2bc7330f3088b894166bf3524a067e3d8Lennart Poettering You should have received a copy of the GNU Lesser General Public License
87d2c1ff6a7375f03476767e6f59454bcc5cd04bLennart Poettering along with systemd; If not, see <http://www.gnu.org/licenses/>.
87d2c1ff6a7375f03476767e6f59454bcc5cd04bLennart Poettering log_error("This program does not take arguments.");
de0671ee7fe465e108f62dcbbbe9366f81dd9e9aZbigniew Jędrzejewski-Szmek log_debug("systemd-journald running as pid "PID_FMT, getpid());
8a03c9ef744e13dc700a7e7ca6cae8afdcf0d71cZbigniew Jędrzejewski-Szmek server_driver_message(&server, SD_MESSAGE_JOURNAL_START,
fb0951b02ebf51a93acf12721d8857d31ce57ba3Lennart Poettering if (server.max_retention_usec > 0 && server.oldest_file_usec > 0) {
fb0951b02ebf51a93acf12721d8857d31ce57ba3Lennart Poettering /* The retention time is reached, so let's vacuum! */
fb0951b02ebf51a93acf12721d8857d31ce57ba3Lennart Poettering if (server.oldest_file_usec + server.max_retention_usec < n) {
fb0951b02ebf51a93acf12721d8857d31ce57ba3Lennart Poettering /* Calculate when to rotate the next time */
f9a810bedacf1da7c505c1786a2416d592665926Lennart Poettering t = server.oldest_file_usec + server.max_retention_usec - n;
fb0951b02ebf51a93acf12721d8857d31ce57ba3Lennart Poettering if (journal_file_next_evolve_usec(server.system_journal, &u)) {
f9a810bedacf1da7c505c1786a2416d592665926Lennart Poettering t = MIN(t, u - n);
da927ba997d68401563b927f92e6e40e021a8e5cMichal Schmidt log_error_errno(r, "Failed to run event loop: %m");
178cc7700c23ac088cd7190d7854282075028d91Lennart Poettering server_maybe_warn_forward_syslog_missed(&server);
de0671ee7fe465e108f62dcbbbe9366f81dd9e9aZbigniew Jędrzejewski-Szmek log_debug("systemd-journald stopped as pid "PID_FMT, getpid());
8a03c9ef744e13dc700a7e7ca6cae8afdcf0d71cZbigniew Jędrzejewski-Szmek server_driver_message(&server, SD_MESSAGE_JOURNAL_STOP,