[syslog-ng]Re: big packets
Balazs Scheidler
bazsi@balabit.hu
Tue, 5 Mar 2002 19:39:36 +0100
On Tue, Mar 05, 2002 at 05:15:11PM +0100, p@netoides.com wrote:
> Hello syslog-ng developers.
>
> We are using your wonderful syslog-ng to receive
> some big message chunks. We noticed that syslog-ng drops
> bytes above 1Kb when using UDP. So, we changed to
> TCP and, to our surprise, we found that syslog-ng
> splits messages in chunks of 1Kb (approx).
>
> Is it possible to configure syslog-ng so that
> each tcp message goes to only one line?
> If this is not possible, what about modifing
> syslog-ng to add this capability?
> We can contribute development effort.
after applying the following patch, you can change the maximum line length
of syslog-ng by changing the MAX_LOG_LINE constant in syslog-ng.h (currently
2048 bytes)
Index: sources.c
===================================================================
RCS file: /var/cvs/syslog-ng/src/sources.c,v
retrieving revision 1.30
diff -u -r1.30 sources.c
--- sources.c 2002/02/28 13:05:37 1.30
+++ sources.c 2002/03/05 18:38:35
@@ -49,7 +49,7 @@
(vars
(dgram simple UINT32)
(pos simple UINT32)
- (buffer array UINT8 MAX_LINE)
+ (buffer array UINT8 MAX_LOG_LINE)
(next object log_handler)))
*/
@@ -81,11 +81,11 @@
size_t salen = sizeof(sabuf);
if (!closure->dgram) {
- n = A_READ(read, MAX_LINE - closure->pos, closure->buffer + closure->pos);
+ n = A_READ(read, MAX_LOG_LINE - closure->pos, closure->buffer + closure->pos);
salen = 0;
}
else
- n = A_RECV(read, MAX_LINE - closure->pos, closure->buffer + closure->pos, (abstract_addr *) &sabuf, &salen);
+ n = A_RECV(read, MAX_LOG_LINE - closure->pos, closure->buffer + closure->pos, (abstract_addr *) &sabuf, &salen);
switch(n) {
case 0:
--
Bazsi
PGP info: KeyID 9AF8D0A9 Fingerprint CD27 CFB0 802C 0944 9CFD 804E C82C 8EB1