aboutsummaryrefslogtreecommitdiffstats
path: root/daemon/syslogd.h
diff options
context:
space:
mode:
authoryaworsky <yaworsky>2005-11-29 13:34:12 +0000
committeryaworsky <yaworsky>2005-11-29 13:34:12 +0000
commit6cbd5fddd7e5be2746d0ceb017aaedd88717848b (patch)
tree0a0367e9c9b998786acdc01a99dd10fb60d0dee0 /daemon/syslogd.h
parent447ff54953c6fd528f161a6d5ab18593db9ad490 (diff)
downloadsyslog-win32-6cbd5fddd7e5be2746d0ceb017aaedd88717848b.tar.gz
syslog-win32-6cbd5fddd7e5be2746d0ceb017aaedd88717848b.tar.xz
syslog-win32-6cbd5fddd7e5be2746d0ceb017aaedd88717848b.zip
Convert all parts of logged message to destination encoding.
This is required if destination encoding is UCS-2 or UCS-4 for example. Otherwise the logfile will not be uniform. Fixed a bug in charset conversion function: divide by zero when cannot convert the first character and calculating new size for the output buffer.
Diffstat (limited to '')
-rw-r--r--daemon/syslogd.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/daemon/syslogd.h b/daemon/syslogd.h
index 7b41db8..b7569bb 100644
--- a/daemon/syslogd.h
+++ b/daemon/syslogd.h
@@ -96,9 +96,12 @@ struct message
int facility;
int priority;
struct string *timestamp;
- struct string *hostname;
- struct string *program;
+ struct string *hostname; /* for logging */
+ struct string *hostname_in_locale; /* for filename construction */
+ struct string *program; /* in locale, for filename construction */
struct string *message;
+ struct string *separator;
+ struct string *end_of_line;
};
extern struct message* create_message( struct source* source,
@@ -197,8 +200,9 @@ struct logpath
struct source *source;
struct filter *filter;
struct destination *destination;
- GIConv message_cd; /* charset conversion descriptor for message */
- GIConv program_cd; /* charset conversion descriptor for program name */
+ GIConv src2dest_cd; /* charset conversion descriptor for message */
+ GIConv ascii2dest_cd; /* charset conversion descriptor for ascii parts of message */
+ GIConv src2locale_cd; /* charset conversion descriptor for those parts that are used for filename construction */
};
extern GList *sources;