Logging, Syslog and Log Anaylsys Forums
March 11, 2010, 06:53:06 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News:
   Home   WIKI BLOG Help Search Recent Topics GoogleTagged Login Register  
Pages: [1]
  Print  
Author Topic: Is it possible to write on syslog without logger/C/Perl ?  (Read 1014 times)
burning chrome
Newbie
*
Offline Offline

Posts: 2


View Profile
« on: June 22, 2009, 05:21:17 pm »

Hi, is it possible to write on syslog without logger/C/Perl ?

I tried to do this on Solaris 5.9:
i've configured syslog.conf this way and rebooted syslogd:
local0.notice                   /var/adm/test.log

then i've executed the following line without errors but it does not write on file test.log
echo "<133>My message">/dev/log

If i use "logger" it works:
logger local0.notice Test

how can i do ?
Is there someone who can help me ?
thank you
Logged
mutex
Administrator
Newbie
*****
Offline Offline

Posts: 895


View Profile
« Reply #1 on: June 22, 2009, 07:24:24 pm »

I am thinking you might need a line terminator at the end of your echo statement - I may not be thinking clearly, but I think that'll work.  I think that is all logger is doing.

Logged
burning chrome
Newbie
*
Offline Offline

Posts: 2


View Profile
« Reply #2 on: June 24, 2009, 05:19:32 pm »

in order to add line terminator i tried in this way:
printf "<133>My message\n">/dev/log
but doesn't work
what am i missing ?
I'm a beginner in syslog so it's correct to write to /dev/log ?
thank you
Logged
Pages: [1]
  Print  
GoogleTagged: logger writing syslog

 
Jump to:  

Information Security News | Jerry Bell's blog | Enterprise IT | Tropical Fish Information | Tropical Fish Forums
Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC | Sitemap Valid XHTML 1.0! Valid CSS!