removing timestamp from message...

This is the place for developers to discuss bugs, new features and everything else about code changes.

removing timestamp from message...

Postby dhaivat.desai » Tue Dec 16, 2008 9:46 am

Hi,

typical rsyslog messages are as follow.....

2008-12-15T19:50:06.357213+01:00 lx4305 rsyslogd: [origin software="rsyslogd" swVersion="3.20.2" x-pid="13457" x-info="http://www.rsyslog.com"] restart

I want to remove the bold caption marked in the message i.e. time & date stamped by rsyslog main module. its because i am passing the time & date from application itself.
i tried a lot, but i m stuck in msg.c, datetime.c, obj.c & queue.c....

i want the message as follow....

lx4305 rsyslogd: [origin software="rsyslogd" swVersion="3.20.2" x-pid="13457" x-info="http://www.rsyslog.com"] restart... (without timestamp...)

is it possible...????

Thanks
dhaivat.desai
Advanced
 
Posts: 42
Joined: Mon Nov 24, 2008 11:49 am

Professional Services Information

  • Custom written rsyslog.conf?
  • Maintenance Contract?
  • Installation support?

Re: removing timestamp from message...

Postby hkspvt » Tue Dec 16, 2008 3:16 pm

hkspvt
Frequent Poster
 
Posts: 125
Joined: Thu Jun 26, 2008 6:31 pm

Re: removing timestamp from message...

Postby dhaivat.desai » Tue Dec 16, 2008 4:14 pm

Yes sir....
i understood wat u wrote in the reply...
just trying to put it into the design which we hv proposed for trading system.
actually as per the requirements, application should not open any network connection or disk file & write messages to it, its bcoz all applications are real time & the response required is in miliseconds....!!!
so to get rid of all this we planned to send all the messages via UDS to local rsyslog & local rsyslog will pass the message to the remote rsyslog...

and I am sorry, because just now i realised tht the question in this post is repeating at some extent with my previous question....
the only problem in my design is local rsyslog will put its timestamp, remote rsyslog once again will put the timestamp.
so was trying to remove date-time stuff from message.

thanks a lot.........
dhaivat.desai
Advanced
 
Posts: 42
Joined: Mon Nov 24, 2008 11:49 am

Re: removing timestamp from message...

Postby rgerhards » Tue Dec 16, 2008 4:45 pm

hi, if you use the default templates, no timestamp will be duplicated. If it is, something is wrong. Also note that you can totally customize any output by just using the proper template. HKS has provided the relevant doc link in the other post.

Also, for my education, can you please post a link to UDS...

Thanks,
Rainer
User avatar
rgerhards
Site Admin
 
Posts: 2641
Joined: Thu Feb 13, 2003 11:57 am

Re: removing timestamp from message...

Postby rgerhards » Tue Dec 16, 2008 5:05 pm

my bad.. I assume UDS = Unix Domain Sockets?
User avatar
rgerhards
Site Admin
 
Posts: 2641
Joined: Thu Feb 13, 2003 11:57 am

Re: removing timestamp from message...

Postby dhaivat.desai » Wed Dec 17, 2008 9:13 am

ya.... i got it....
after hving look at templates, i am using them in config files to format the custom message string....

once final code changes r done (mostly by tommorrow), i will post it...!!! :-)

Thanks.....
dhaivat.desai
Advanced
 
Posts: 42
Joined: Mon Nov 24, 2008 11:49 am

Re: removing timestamp from message...

Postby dhaivat.desai » Mon Dec 22, 2008 10:03 am

attached is the code for imuxstream.c

http://pastebin.com/m17074a41

Thanks
dhaivat.desai
Advanced
 
Posts: 42
Joined: Mon Nov 24, 2008 11:49 am

Google Ads



Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 0 guests

cron