MCPcopy Index your code
hub / github.com/RsyncProject/rsync / logfile_open

Function logfile_open

log.c:153–167  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

151}
152
153static void logfile_open(void)
154{
155 mode_t old_umask = umask(022 | orig_umask);
156 logfile_fp = fopen(logfile_name, "a");
157 umask(old_umask);
158 if (!logfile_fp) {
159 int fopen_errno = errno;
160 /* Rsync falls back to using syslog on failure. */
161 syslog_init();
162 rsyserr(FERROR, fopen_errno,
163 "failed to open log-file %s", logfile_name);
164 rprintf(FINFO, "Ignoring \"log file\" setting.\n");
165 logfile_name = "";
166 }
167}
168
169void log_init(int restart)
170{

Callers 2

log_initFunction · 0.85
logfile_reopenFunction · 0.85

Calls 3

syslog_initFunction · 0.85
rsyserrFunction · 0.70
rprintfFunction · 0.70

Tested by

no test coverage detected