log personal message to /var/log/messages

August 14th, 2006 mysurface Posted in Admin, backquote, logger, tail | Hits: 94581 | 17 Comments »

To log personal messages to /var/log/messages when you write script, you can use logger

simple example:

logger i am testing

And check the result with tail, it display last 10 line of messages by default

tail /var/log/messages

To put more info to log file, you can specified the timestamp with scriptname by this

logger -t `basename $0` i am still testing

basename is to display scriptname without ./ or the parent’s path, back quote (`) is to pass the result string to logger.

17 Responses to “log personal message to /var/log/messages”

  1. Thanks, very useful!!!

  2. I have a doubt.How do I write a a message from my program to /var/log/messages ? Is this possible? How?

  3. devendra koli Says:

    Thank you so much

  4. DuevEbeverlee Says:

    get and get big save for more detail

  5. My family members always say that I am killing my time here at net, however I know I am getting knowledge everyday by reading such
    nice content.

  6. Hmm it appears like your blog ate my first comment
    (it was super long) so I guess I’ll just sum it up what I had written and say, I’m thoroughly enjoying your blog.
    I as well am an aspiring blog blogger but I’m still new to everything. Do you have any tips and hints for inexperienced blog writers? I’d genuinely appreciate it.

  7. This is a topic that’s near to my heart… Thank you!

    Exactly where are your contact details though?

  8. I usually do not write a comment, but I browsed a ton of remarks here log personal message to /var/log/messages ?
    Linux by Examples. I actually do have a couple of questions for you
    if you tend not to mind. Is it only me or do some of the remarks appear as if they are coming from brain dead folks?
    :-P And, if you are posting at additional sites, I would like to follow everything new you
    have to post. Could you make a list of every one of all your social networking sites
    like your twitter feed, Facebook page or linkedin profile?

    Feel free to visit my webpage :: The Baby Télécharger Le Film

  9. I’m impressed, I must say. Rarely do I encounter a blog that’s both equally educative
    and interesting, and let me tell you, you’ve hit the nail on the head.

    The issue is something too few men and women are speaking
    intelligently about. I am very happy I came
    across this in my hunt for something concerning this.

    my blog post: Match Retour Télécharger Le Film

  10. My brother suggested I would possibly like this web site.
    He used to be entirely right. This put up actually made my day.
    You can not believe just how a lot time I had spent for this info!

    Thanks!

    my weblog Avis de mistral Télécharger Le Film

  11. Right here is the perfect site for everyone who wishes to understand this topic.

    You know so much its almost tough to argue with you (not that I personally would
    want to…HaHa). You definitely put a brand new spin
    on a topic that’s been written about for years.

    Great stuff, just excellent!

    Here is my homepage; Dark Touch Télécharger Le Film

  12. Thanks for one’s marvelous posting! I quite enjoyed reading it, you happen to be a great author.
    I will be sure to bookmark your blog and will come back someday.
    I want to encourage one to continue your great job, have a nice day!

    Here is my blog; la vérité sur l’affaire Ilan Halimi Télécharger Le Film

  13. Hi, yup this article is truly good and I have learned lot of things
    from it concerning blogging. thanks.

    Here is my weblog :: Le Vent se lève Télécharger le film

  14. ??????????????? ???????????????????????????????????????????????

    ???????????????????? ???????????????
    ??????????????? ??10?????????????????????? ?????????????????????????

    ???????wwwwwwwwwwwwwwwwwwwww ?? (is.gd) ???????? ???? ???wwwwwwwwwwwwwwwwwwww

  15. With Flash enabled, rich media content can be effortlessly
    displayed in Pulse News, allowing for video clips and audio
    together with the usual text-based news feeds. First, in these kinds of leak investigations, reporters will never be targeted.

    If it really is worth your time and effort and concentration be rest assured
    you are going to find it with the Hindi Samachar.
    We witness dramatic differences if we compare these
    periods of Indian Cinema.

    They become doubtful concerning which one of the two
    (reading, listening) matters most. Some people just
    cannot help themselves: it’s the way they’re made (the best way
    I react when a menu offers me a range of ‘Salad’s’ – salad’s
    what. samsung chromebook review then; tr.im, Allow yourself to have the truth of one’s creative experience.
    SEO content writing is a marketing strategy that requires article writing
    so that you can improve the availability of a specific
    website.

  16. [...] Fuente Compartir // Sharrre jQuery(document).ready(function(){ jQuery('#twitter').sharrre({ share: { twitter: true }, template: '{total}', enableHover: false, enableTracking: true, buttons: { twitter: {via: 'yvoictra'}}, click: function(api, options){ api.simulateClick(); api.openPopup('twitter'); } }); jQuery('#facebook').sharrre({ share: { facebook: true }, template: '{total}', enableHover: false, enableTracking: true, click: function(api, options){ api.simulateClick(); api.openPopup('facebook'); } }); jQuery('#googleplus').sharrre({ share: { googlePlus: true }, template: '{total}', enableHover: false, enableTracking: true, urlCurl: 'http://egomezm.es/wp-content/themes/hueman/js/sharrre.php', click: function(api, options){ api.simulateClick(); api.openPopup('googlePlus'); } }); jQuery('#pinterest').sharrre({ share: { pinterest: true }, template: '{total}', enableHover: false, enableTracking: true, buttons: { pinterest: { description: 'Logear mensajes personales en el /var/log/messages' } }, click: function(api, options){ api.simulateClick(); api.openPopup('pinterest'); } }); }); [...]

  17. I do not know if it’s just me or if perhaps everyone else encountering issues with your website.
    It appears as if some of the written text within your posts are running off the screen.
    Can somebody else please provide feedback and let me know if this is happening to them too?
    This may be a issue with my browser because I’ve had this happen previously.
    Appreciate it

Leave a Reply