Commit Graph

111 Commits

Author SHA1 Message Date
Wayne Davison
0455cd933d - Made the handling of adjacent percents (e.g. "%%b") work like it
did in older versions.
- Added a comment for log_format_has().
2005-03-31 03:01:26 +00:00
Wayne Davison
d9c0051fae In log_formatted(), add the newline to the format string so
that we can call rwrite() instead of rprintf().
2005-03-31 01:09:18 +00:00
Wayne Davison
126e7affb7 Enabled width-sizing for %L. 2005-03-31 00:50:58 +00:00
Wayne Davison
16f960feb5 Added log_format_has(). 2005-03-31 00:19:13 +00:00
Wayne Davison
e145d51ba6 Make sure that we can't scan past the end of the format string. 2005-03-30 23:39:00 +00:00
Wayne Davison
dcbae65444 Optimized '%f' a little more. 2005-03-30 20:41:11 +00:00
Wayne Davison
b4bf2b5a7e Allow %i to have a field width. 2005-03-30 20:18:48 +00:00
Wayne Davison
9baed7609c - Allow the infix field width to start with a '-'.
- Apply the field width to all escapes, not just numeric ones.
2005-03-30 19:44:29 +00:00
Wayne Davison
ddd74b67be Allow the escapes in the log-format string to contain a numeric
field width (e.g. %8l %07p).
2005-03-30 18:27:09 +00:00
Wayne Davison
c1759b9fa2 Changed %i to output '>' for a local copy. 2005-03-30 16:35:01 +00:00
Wayne Davison
cc3e0770bc Decided that the '<' and '>' output in the %i format were
the opposite of what they should be.
2005-03-27 05:32:36 +00:00
Wayne Davison
26718401fb Added the error message for RERR_LOG_FAILURE and used it when
the daemon can't open the log-file.
2005-03-15 23:23:41 +00:00
Wayne Davison
d5609e969d Output a '*' at the start of the %i string when deleting. 2005-03-13 05:35:49 +00:00
Wayne Davison
fd84673e54 Handle the new way that 'c' and 'h' get output by "%i". 2005-03-09 18:53:58 +00:00
Wayne Davison
9b9dd06894 We need to mention any change to a directory, not just a time change.
Yeah, this isn't very consistent with how files are treated, but it's
backward compatible.
2005-03-09 04:00:20 +00:00
Wayne Davison
24cecf1365 Define the message for RERR_DEL_LIMIT. 2005-03-05 18:58:35 +00:00
Wayne Davison
ca62acc3ca - Make use of the new ITEM_* flags to mention when things were
updated locally instead of being updated remotely.
- Added support for outputting 'a' in the itemized log-output (for
  future use in extended-attribute handling).
2005-03-05 00:21:50 +00:00
Wayne Davison
1c3e3679ef Added maybe_log_item() for use by the sender and receiver. 2005-03-04 16:52:00 +00:00
Wayne Davison
afc65a5acf - Replaced log_send() and log_recv() with log_item().
- Made log_formatted() and log_item() take an "hlink" arg that
  will be used to pass in a hard-link name for use in %L.
2005-03-04 16:07:50 +00:00
Wayne Davison
41b5b5e756 The log_delete() function may now be called even when the client is
not getting delete messages, which ensures that the daemon's log-
file output includes all deletions when per-file logging is enabled.
2005-02-26 04:49:30 +00:00
Wayne Davison
4a239e98f6 Reposition log_open() and log_close(). 2005-02-21 00:38:15 +00:00
Wayne Davison
1eec003a80 The FCLIENT log code aviods putting the message into the daemon's
log file and instead sends a FINFO message to the client.  This is
used when the daemon wants to log a better message locally than it
is sending to the client.  Improved log_delete() to make use of this
idiom if it needs to log a separate delete message for the daemon
and the client.
2005-02-19 22:16:41 +00:00
Wayne Davison
088aff1a48 - Don't log a delete message to the daemon log in dry-run mode.
- The daemon's wrote/read log message now uses the terms
  sent/received.
2005-02-19 17:23:08 +00:00
Wayne Davison
d6707171e6 Decide whether to log a delete message via the default format by
checking the new log_format_has_o_or_i variable, not itemize_changes.
2005-02-19 03:54:13 +00:00
Wayne Davison
19bc826d8b - Tweaked the letters output by "%i", including adding support for
logging a deleted item and an identical item.
- Added log_delete(), a routine that either logs the fact that a
  deletion happened, or sends a MSG_DELETED message to the client
  side (or both if we're a daemon server receiver).
2005-02-19 02:39:26 +00:00
Wayne Davison
e66d70e34c The '%n' escape needs to append a trailing slash onto a directory name. 2005-02-18 20:17:17 +00:00
Wayne Davison
2267efeac5 Made log_open() non-static and moved log_close() next to it. 2005-02-18 17:33:43 +00:00
Wayne Davison
d4e0196346 Use '.' for unchanged attributes in the %i output. 2005-02-17 09:16:23 +00:00
Wayne Davison
ef74f5d626 - Improved log_formatted() to handle long filenames better.
- Added %i, for the list of itemized changes, %n for the normal
  filename (might be shorter than %f), and %L for a " -> symlink"
  string IIF the item is a symlink (else "").
- The log_{send,recv}() functions now take an "iflags" arg.
2005-02-16 08:10:28 +00:00
Wayne Davison
1e7098b5e3 Fixed a typo. 2005-02-15 03:38:04 +00:00
Wayne Davison
4875d6b64d Adding more calls to safe_fname(). 2005-02-07 20:36:43 +00:00
Wayne Davison
c32edbe02e Make sure the %f expansion handles the new dir.root properly. 2005-02-01 09:23:59 +00:00
Wayne Davison
2b1366635d Refer to the old basedir variable as dir.root. 2005-02-01 09:21:28 +00:00
Wayne Davison
4ccfd96cfe Tweaked one or more warning messages. 2005-01-31 19:13:19 +00:00
Wayne Davison
63ecee4d1a Made log_open() static and made it die with an error if the
log-file can't be opened.
2005-01-28 17:42:21 +00:00
Wayne Davison
584ba4ebae Fixed a typo Paul pointed out. 2004-09-05 21:30:00 +00:00
Wayne Davison
58b1999e08 Call clean_flist() with its new "collapse_dot_dot" arg. 2004-08-12 18:20:07 +00:00
Wayne Davison
0bb4d17634 Improved rwrite() in two ways:
- We no longer assume that the buffer is null terminated (daemon
  mode would ignore the len when logging a message).
- Errors in daemon mode are now sent to both the log and the user.
2004-06-07 22:51:14 +00:00
Wayne Davison
8fcdc444df - Improved rsyserr() to prefix RSYNC_NAME (as the TODO requested),
to construct the string in a better manner, and to have a buffer
  big enough to hold a full MAXPATHLEN filename plus some error
  text.
- Fixed some comments referring to vsprintf() returning -1 -- our
  configuration process now ensures that we replace such a function
  with our own lib version.
2004-05-15 19:31:16 +00:00
Wayne Davison
4ce48a5bfd Restore old behavior of logging most daemon errors instead of sending
them to the user.  This should eventually be improved to duplicate
some of these messages to the user to keep them informed about what
went wrong.
2004-04-29 19:34:31 +00:00
Wayne Davison
81d2b0ef9d Use new pathjoin() function. 2004-01-20 05:15:14 +00:00
Wayne Davison
a644fc3cc4 - Moved err_list* stuff to io.c and renamed them to msg_list*.
- Call the new send_msg() function to send a remote log message.
2004-01-15 07:42:19 +00:00
Wayne Davison
548abf96ce Relocated some externs. 2004-01-13 04:50:45 +00:00
Wayne Davison
1bca1de6cc Handle new RERR_VANISHED error. 2003-12-15 08:06:52 +00:00
Wayne Davison
4a7319be12 Neatened up some whitespace issues and made multi-line comments more
consistent.
2003-12-15 01:45:01 +00:00
Wayne Davison
58cadc8608 Merged in the security fixes from 2.5.7. 2003-12-06 21:07:27 +00:00
J.W. Schultz
42d4edc067 removed log_transfer() It was no more than a conditional
rprintf() with an unused param.
2003-03-25 02:28:54 +00:00
David Dykstra
b45b059a3d Back out one of the changes in log.c revision 1.62, and always send errors
to the client after multiplexing is enabled.
2003-02-11 19:13:51 +00:00
Jos Backus
1e34e4b7cd Add "void" to some function definitions so that all declarations in proto.h
have full parameter lists. This helps unbreaking compilation on SCO UNIXWare.

Submitted by: Stephen Friedl
2002-12-24 07:42:04 +00:00
David Dykstra
30e8c8e1e4 When using daemon mode over a remote shell program and not running as root,
default the config file to just "rsyncd.conf" in the current directory
instead of /etc/rsyncd.conf.  Also, fix problems with logging messages when
running daemon mode over a remote shell program: it was pretty much doing
the opposite of what it should have, sending early error messages to the
log and later messages to the client.  Switched it around so the very early
error messages go to the client and the later ones go to the log.
2002-08-30 23:27:26 +00:00