Logs keep accumulating older messages
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
Hi Aniruddha,
I haven't maintained this code in a few years. If I had more time, I would look at your issue, but I don't expect I will be able to get to it, at least anytime soon. The only thing I can suggest is for you to try the different command-line options as documented. If I recall, there should be a command line option for prepending text to each line, you may wish to use this option to make sure a "newline" character is written.
Regards, Michael
On Tue, Apr 18, 2017 at 11:40 PM, Aniruddha. A [email protected] wrote:
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
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/yahoo/filelogger/issues/1, or mute the thread https://github.com/notifications/unsubscribe-auth/AGfAIdJVJa8HnDIuDV2RUmaJs6hc3GR4ks5rxaxVgaJpZM4NBQmy .
--
Michael Martinez http://www.michael--martinez.com
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
If you find the issue, let me know and I'll add a patch to the code.
On Thu, Apr 20, 2017 at 1:36 AM, Aniruddha. A [email protected] wrote:
Sure, No problem, I completely understand :) (I am in a similar situation for another project which I have pushed to Wireshark!). I will try to debug. Thanks
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/yahoo/filelogger/issues/1#issuecomment-295634972, or mute the thread https://github.com/notifications/unsubscribe-auth/AGfAIdrVSL6xEOAhBp2zL086DHXe75xAks5rxxkogaJpZM4NBQmy .
--
Michael Martinez http://www.michael--martinez.com
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! 💯
HI Aniruddha,
Thanks for the information. When I have a chance, I'll go ahead and incorporate your modifications into the code. Or if you want, you can create a branch with your changes and submit a pull request.
-Thanks!
On Fri, Apr 21, 2017 at 12:21 AM, Aniruddha. A [email protected] wrote:
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! 💯
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/yahoo/filelogger/issues/1#issuecomment-296104970, or mute the thread https://github.com/notifications/unsubscribe-auth/AGfAIfw8oozCFmvqiazXVWoU0hDiGy5eks5ryFjkgaJpZM4NBQmy .
--
Michael Martinez http://www.michael--martinez.com