aboutsummaryrefslogtreecommitdiff
path: root/src/rc/rc-logger.c
AgeCommit message (Collapse)Author
2021-12-21code style: remove space after unary "not" operatorMatt Whitlock
There are no semantic changes in this commit. Suggested-by: Mike Frysinger <vapier@gentoo.org> See: https://github.com/OpenRC/openrc/pull/435#pullrequestreview-727035394
2021-12-20use HEAD in git URIs to point to the default branchMike Frysinger
This makes the URIs shorter and dynamic: whatever the default branch the repo uses will be used.
2018-05-22Logger: only log printable characters and newlinesWilliam Hubbs
X-Gentoo-Bug: 651412 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=651412
2018-05-10Revert "Logger: only log printable characters and newlines"William Hubbs
This reverts commit 2b1392af2fe9e5dfc8eda2f19d896efdc41840bf. This seems to create issues shutting down, so I need to look into it further.
2018-05-09Logger: only log printable characters and newlinesWilliam Hubbs
X-Gentoo-Bug: 651412 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=651412
2017-05-30rc-logger.c: fix crash on fclose(NULL) (#137)Sergei Trofimovich
Only close the log if we successfully opened it. Reported-by: Brian Evans <grknight@gentoo.org> Tested-by: Brian Evans <grknight@gentoo.org> Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
2016-07-24rc-logger: refuse to cat TMPLOG into itselfDoug Freed
This prevents an infinite loop in case somebody decides to set rc_log_path to match TMPLOG.
2015-12-21Convert OpenRC to a centralized copyright/license structureWilliam Hubbs
In the past, OpenRC was a hybrid of a centralized and file-scope license/copyright structure. I followed the instructions from the Software Freedom Law Center [1] to convert to a Centralized structure where possible, for easier future maintenance. [1] https://softwarefreedom.org/resources/2012/ManagingCopyrightInformation.html
2015-11-11Standardize macro tests for gnu hurdBenda Xu
This also fixes breakage of GNU/hurd builds introduced by commit 3f82edbeb92.
2014-10-23Bundle <sys/queue.h> from NetBSDAnthony G. Basile
We are bundling this to allow building on musl-based systems since musl does not include <sys/queue.h>.
2014-10-23Fix all tests for GNU/kFreeBSDWilliam Hubbs
It is necessary to check for both the kernel and c library because __FreeBSD_kernel is also defined on native FreeBSD [1]. [1] http://sourceforge.net/p/predef/wiki/OperatingSystems/
2014-10-22Fix GNU/kFreeBSD portSvante Signell
Check for __FreeBSD_kernel instead of __GLIBC__ in source files. note from William Hubbs: I was told this is a better check for GNU/kFreeBSD than checking the C library the source is being compiled against. GNU/kFreeBSD than checking which library we are using.
2013-10-30Begin port to GNU/kFreeBSDSteven Chamberlain
This is just a minimal port to get Debian up and running; the rest will be done later.
2012-01-28Do not unlink the temp. log during shutdownChristian Ruppert
Also ignore errors in case of EROFS (Read-Only file systems) Reported-by: Maxim Kammerer X-Gentoo-Bug: 401115 X-Gentoo-Bug-URL: https://bugs.gentoo.org/401115
2011-12-29Don't try to write the log during sysinitChristian Ruppert
During the sysinit and shutdown runlevels the logfile destination may be read-only. Skip the error messages in this case. X-Gentoo-Bug: 390645 X-Gentoo-Bug-URL: https://bugs.gentoo.org/390645
2011-12-29Use RC_LEVEL_SHUTDOWNChristian Ruppert
2011-12-29Remove useless rc_runlevel_get() callChristian Ruppert
The current runlevel will be passed to rc_logger_open() already.
2011-12-29Don't print error when the logfile isn't writeable during shutdownChristian Ruppert
The logfile or its basedir may be read-only during shutdown because the directory may be umounted or read-only remounted already. In this case we simply skip this error. This is related to a comment in bug 390645 but the initial bug is not fixed through this commit. X-Gentoo-Bug: 390645 X-Gentoo-Bug-URL: https://bugs.gentoo.org/390645
2011-07-06Rename rc_logger_path to rc_log_pathChristian Ruppert
2011-07-05Improve loggingChristian Ruppert
Add "e" (O_CLOEXEC) to all fopen() calls. Remove system() call and replace it by fopen() and friends. This also fixes bug 368933 X-Gentoo-Bug: 368933 X-Gentoo-Bug-URL: https://bugs.gentoo.org/368933
2011-06-29drop useless "All rights reserved" noticeMike Frysinger
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-01-17Clean up all trailing whitespace in src/.Robin H. Johnson
2009-05-01Add (c) to CopyrightRoy Marples
2009-04-30Avoid more gcc warning about not checking return values ...Roy Marples
2009-04-23Improve style for KNFRoy Marples
2009-04-02When logging, stdout isn't always a tty, which is the case for VPS Roy Marples
systems, Thanks to mwrobel - fixes #106.
2008-11-28Style.Roy Marples
2008-11-27Switch from select to poll and improve the no prefixing of eend calls.Roy Marples
2008-07-02Fix compile with pcc.Roy Marples
2008-04-17Cast to unsigned char for ctype calls.Roy Marples
2008-03-26Add license blurb to a few files and append my email to my name.Roy Marples
2008-03-16Remove null terminated char ** lists in favour of RC_STRINGLIST, using TAILQ ↵Roy Marples
from queue(3). Refactor code style around the BSD KNF.
2008-02-28Don't leak fd's.Roy Marples
2008-02-22Welcome to 2008.Roy Marples
2008-02-20Move logfile without a visible error, bug #28Roy Marples
2008-01-22Quiet some more lint warnings.Roy Marples
2008-01-14strip trailing newlinesMike Frysinger
2008-01-11Re-indent to a standard tw of 8.Roy Marples
2008-01-09Compile without warnings on NetBSDRoy Marples
2008-01-07rc_getline keeps expanding it's malloced buffer until it has read a whole ↵Roy Marples
line or EOF. All functions which read into static buffers have been changed to use fhis function to avoid any potential overflows and to ensure we really do read a long long config line.
2008-01-06Set include paths in Makefile instead of .c filesRoy Marples
2008-01-05Add the missing changes from the recent Makefile updatesRoy Marples
2008-01-05Add some .mk stubs to impersonate bsk .mk files to make writing our ↵Roy Marples
Makefiles easier. libeinfo, librc and rc now have their own seperate directories. More work is needed to tidy this up though.