DaemonForums  

Go Back   DaemonForums > Miscellaneous > Guides

Guides All Guides and HOWTO's.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 26th April 2021
J65nko J65nko is offline
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 4,128
Default Logging to syslogd (/var/log/messages) with logger(1)

To be able to see the error messages logged by Firefox or Iridium in the system log, I wrote a simple shell script named iridium.sh.

The logging is done by calling logger(1) which according to this manual page "provides a shell command interface to the syslog(3) system log module".
Code:
#!/bin/sh
# log iridium errors to syslogd  var/log/messages with logger(1) 

TAG=iridium

# --- mark startup with version number
/usr/local/bin/iridium --version  | logger -t $TAG 

# --- start and pass possible parameters in "$@" 
/usr/local/bin/iridium "$@"  2>&1 | logger -t $TAG

echo $0: finished! | logger -t $TAG
 
# ----
Run it in the background with $ ./iridium.sh &
The system will respond with something like: [
Code:
[1] 42439
Some entries from starting up:
Quote:
Apr 25 02:21:09 ml310e iridium: (iridium:53757): Gtk-CRITICAL **: 02:21:09.659: Unable to create user data directory '/home/snap2/.local/share' for storing the recently used files list: No such file or directory
[snip]
Apr 26 04:33:59 ml310e iridium: Iridium 2021.03
Apr 26 04:33:59 ml310e iridium: *** autoupdate was enabled, overriding with false
Apr 26 04:33:59 ml310e iridium: [32490:1474661720:0426/043359.952970:ERROR:viz_main_impl.cc(150)] Exiting GPU process due to errors during initialization
Apr 26 04:34:00 ml310e iridium: [59593:-281405888:0426/043400.318602:ERROR:ev_root_ca_metadata.cc(840)] Failed to register OID: 0
Attached Files
File Type: sh iridium.sh (330 Bytes, 33 views)
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump
Reply With Quote
Reply

Tags
logger, syslogd

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
URL logging beavers OpenBSD General 15 9th March 2019 01:54 AM
change syslogd to rsyslogd MatthiasKoch OpenBSD General 6 5th November 2016 01:21 PM
Send Syslogd To External Host plexter OpenBSD General 2 18th July 2011 08:11 PM
Freebsd 7.1-STABLE and dd-wrt v24 syslogd da1 FreeBSD General 9 16th March 2009 05:15 PM
Silencing gconfd spam in syslogd... BSDfan666 Guides 0 12th December 2008 10:01 PM


All times are GMT. The time now is 04:07 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick