logger + filter


 
Thread Tools Search this Thread
Operating Systems Solaris logger + filter
# 1  
Old 08-24-2009
logger + filter

Hi,

I have an application log file and I am redirecting it to syslog
...| logger -p user.err


Howver, the size redirected is too arge and I am seeking a way to filter what to redirect to syslog.

any mean to do this, knowing that I do not want to decrease the log level of the app?

thank you
# 2  
Old 08-24-2009
Code:
...| grep 'things you are interested in' | logger -p user.err

or
Code:
...| grep -v 'things you are NOT interested in' | logger -p user.err

Or a combination
Code:
...| grep 'things you are interested in' | grep -v 'specific things you are NOT interested in that would normally be included by the first grep' | logger -p user.err

Or just keep it all and have your syslog.conf set to put it all in a different file, then manage it via logadm etc to keep the size under control.
Login or Register to Ask a Question

Previous Thread | Next Thread

5 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Logger command not working for one script

Hi, On RHEL 7.2, I created below script in cronjob for every minute. If this process is found to be not running, it should record message in /var/adm/xymessages, start it and send email. #!/bin/bash source /export/home/prodadm/.bash_profile if ; then ... (8 Replies)
Discussion started by: ron323232
8 Replies

2. Red Hat

Mounting temperature logger on Centos 7.0

When inserting a temperature logger into a Centos 7.0 machine, the relevant dmesg lines read: usb 2-1.4: new full-speed USB device number 4 using ehci-pci usb 2-1.4: New USB device found, idVendor=10c4, idProduct=82cd usb 2-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0 usb... (5 Replies)
Discussion started by: figaro
5 Replies

3. Cybersecurity

Unix keystroke logger

Hi all, Does anyone know if there is a tool in the market that could do the following when System Admin log to the server as root and perform activities according to his change request: - trap or log his keystroke for the entire duration - provide a report on the changes SA has made to the... (3 Replies)
Discussion started by: mohzub
3 Replies

4. Programming

Key logger

I want to program my own key logger to register every key pushed on my system... could i record clicks? Well, my question in fact is not one at all... because i dont have a starting point. I'll appreciate your bases :(. ty. (5 Replies)
Discussion started by: Jariya
5 Replies

5. Shell Programming and Scripting

Logger Command

Hi I have a command in a script . /usr/bin/iostat -E I would like to place an entry in /var/adm/messages (via syslog) as a daemon.notice using the logger command but i just cant work out the syntax for this , do I pipe the output of iostat into logger? or is it redirected...can somebody give me... (1 Reply)
Discussion started by: hcclnoodles
1 Replies
Login or Register to Ask a Question