Skip to content
This repository has been archived by the owner on Apr 16, 2019. It is now read-only.

Logs keep accumulating older messages #1

Open
aniruddha-a opened this issue Apr 19, 2017 · 5 comments
Open

Logs keep accumulating older messages #1

aniruddha-a opened this issue Apr 19, 2017 · 5 comments

Comments

@aniruddha-a
Copy link

I tried with the filelogger 64-bit binary given in the release - didnt work for me (error explained later),
so I tried to re-compile with the latest version of coreutils and util-linux, still the same issue!
Should be some issue in the code!

Error:

Say I set up filelogger to watch a file like:

  $ filelogger test

And I do:

  $ echo Log1 >> test
  $ echo Log2 >> test

What I see in /var/log/syslog is:

 Apr 19 12:04:45 dev1443 ani: Log1
 Apr 19 12:04:52 dev1443 ani: Log1#012Log2

Further messages go on getting appended with #012 as a separator.

I am Ubuntu 14.04.3

@mwtzzz-zz
Copy link
Contributor

mwtzzz-zz commented Apr 19, 2017 via email

@aniruddha-a
Copy link
Author

aniruddha-a commented Apr 20, 2017

Sure, No problem, I completely understand :) (I am in a similar situation for some code which I have pushed to Wireshark!). I will try to debug. Thanks

@mwtzzz-zz
Copy link
Contributor

mwtzzz-zz commented Apr 20, 2017 via email

@aniruddha-a
Copy link
Author

Hi Michael,

The remote UDP logging is working fine, as explained in the homepage. The issue was only with the
local log (since I started trying out local logging initially), I changed the following line in xwrite_logger() :

 syslog(pri, "%s", logthis);

to

syslog(pri, "%.*s", n_bytes, buffer);

And local logging worked fine.
Thank you. Clubbing tail and logger is a cool idea! 💯

@mwtzzz-zz
Copy link
Contributor

mwtzzz-zz commented Apr 21, 2017 via email

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants