• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 752
  • Last Modified:

how to use logger in Linux.

There is a unitility called logger. I would like to use it. I want to log the info: "The process is starting."
logger -t BACKUP -f //tmp//backup.log message The process is starting.
No error message shown up in screen or in backup.log, but no infomation was logged in either. How
2 Solutions
Todd MummertCommented:

logger doesn't work the way you think it does.   It's an interface to the SYSLOG system logger

the [-f fname] flag   takes each line from fname  and puts it in SYSLOG (may be /var/log/syslog on your machine)

if there is a message provided, the [-f fname] option appears to be ignored

So, in /var/log/syslog  you probably have lines of the form

date host BACKUP: message The process is starting.

Monis MontherSystem ArchitectCommented:
you will find your log message in /var/log/messages

you can check your /var/log/messages |grep BACKUP (your tag) to get all messages generated by it

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now