Questions tagged [logger]

The tag has no usage guidance, but it has a tag wiki.

Filter by
Sorted by
Tagged with
1 vote
1 answer
82 views

Rsyslog losing log message when file does not exist

I'm encountering case when rsyslog message is lost when the file its supposed to write to does not exist. Here is my setup: log server 192.168.1.2 have such config: module(load="imtcp") ...
user avatar
  • 177
0 votes
1 answer
112 views

Should (and how can) non-critical logs be sent to /var/log/messages using logger(1)?

I have a cron script logging msgs via | logger …. I am understanding that /var/log/syslog is mainly for critical or err msgs and /var/log/messages is for informational, non-critical msgs. If the ...
user avatar
0 votes
2 answers
37 views

logger command reports I am a user even if running under sudo?

I have a line logger Ok in my script. When I run it from command line with either of ./myscript.sh sudo ./myscript.sh sudo bash ./myscript.sh it writes in log Oct 17 22:32:01 d40688 mysqlf: Ok I.e. ...
user avatar
  • 2,617
0 votes
2 answers
58 views

Does logger(1) command belong to util-linux? [duplicate]

Does logger(1) command belong to util-linux? it is not shown in https://manpages.debian.org/testing/util-linux/index.html, but in https://manpages.debian.org/testing/bsdutils/logger.1.en.html.
user avatar
  • 81
1 vote
1 answer
437 views

How to record local3 with all severity levels to a file using system logger?

I'm using a VM. Ubuntu Linux. What I'm trying to do is use System logger to record the local3 facility with all severity levels to a file /var/log/local3.log I'm confused as to what the process is. Am ...
user avatar
0 votes
0 answers
50 views

given `logger -t specificUser` how do filter tail by that tag? (tail -f ??? specificUser)

if i'm tagging my logs with -t, how do i filter my log searches for that specific tag? given: logger -t specificUser show it (in real time) with tail -f ???? specificUser
user avatar
2 votes
0 answers
145 views

How to encrypt messages using TLS encryption and send to sys logger?

I am using following logger command to send message to /var/log/message. logger -n 10.102.5.19 "system shutdown" my question is, how to encrypt the message("system shutdown") using TLS encryption. I ...
user avatar
  • 21
2 votes
1 answer
2k views

Redirecting logs to a file using systemd is not working

I am trying to redirect logs to a file using systemd. I have tried adding below statements to the service. StandardOutput=file:/tmp/test1.txt StandardError=file:/tmp/test2.txt But those files are ...
user avatar
  • 193
0 votes
0 answers
645 views

Logger on remote server

I am trying to send log message to my virtual machine from work station. Command : logger -n 192.168.122.78 Test After this command nothing shows up in /var/log/messages of VM, or work station. No ...
user avatar
  • 65
0 votes
1 answer
2k views

how to use logger to write info to log

I want to use the logger command in order to write logs to /var/log/server.log NOTE: These examples use the FreeBSD version of logger. Your system may have different options, so read your local ...
user avatar
  • 11k
0 votes
1 answer
296 views

logger + how to change the logger title instead user root

I want to use the log - /var/log/message for my logs my application name is - whatsapp_man for example I send the following warning to the log [root@worker01 ~]# logger "please noitce you are before ...
user avatar
  • 11k
1 vote
1 answer
261 views

rsyslog only making log files in /var/logs

Running centos 7, my rsyslog.conf looks like this: 59 # Log all the mail messages in one place. 60 mail.* /var/log/maillog 61 mail.* /var/log/logtest1 62 mail.* /root/logtest Then I use the ...
user avatar
  • 393
0 votes
1 answer
192 views

Logger -f command killed opening /var/log/messages in tail

I'm trying to run this command on CentOS. logger -t AUDIT_LOG -f <MY_AUDIT_LOG_FILE> & It works correctly for 10/20 seconds. Opening /var/log/messages in tail I can correctly see messages ...
user avatar
2 votes
1 answer
650 views

Pipe nohup output to logger w/ different priorities

I've got a third-party Python script to run in background using nohup. And instead of piping the output to a file I'd like the output to be appended to the system log using logger. Added to that I ...
user avatar
0 votes
1 answer
614 views

Is it good to have many log filters in rsyslog conf

I am planning to add filters in rsyslog.conf to redirect the syslog messages based on a tag so that I can log using logger and redirect to a custom log file. configuration in rsyslog.conf looks ...
user avatar
0 votes
1 answer
1k views

Why is directing stdout to a file inconsistent and delayed? [duplicate]

I have tried two methods to direct the output of a program's printf calls to a file. In both cases, sometimes the file is updated immediately, sometimes it takes several minutes, and sometimes it ...
user avatar
  • 101
1 vote
1 answer
933 views

Having trouble redirecting application output to log file

I have an embedded ARM device running Linux which launches an application on boot. This application has a bunch of "printf(...)" statements in it that I need to view. The normal way I have been ...
user avatar
2 votes
1 answer
601 views

iptables LOG only once

I noticed that there are data in the iptables log that I don't need, so I was wondering if it's possible to change some configuration so that the log has less information, thus reducing the log's size....
user avatar
  • 21
2 votes
1 answer
795 views

fail to log through rsyslog on an archlinux system

Using release 2016.03.01 from Archlinux, with package rsyslogd 8.18.0, I started from the minimal configuration built from Very simple config : # cat rsyslog.conf $ModLoad immark $ModLoad imudp $...
user avatar
  • 207
0 votes
1 answer
211 views

How to customize Shorewall firewall logs

I am using Fedora 13 machine with shorewall installed. shorewall 4.6.6-RC1 iptables v1.4.7 Below is log format by shorewall: Oct 23 05:28:17 localhost kernel: shorewall:LAN-LAN:ACCEPT:IN= OUT=lo SRC=...
user avatar
  • 79
0 votes
1 answer
291 views

Is there a way to log key presses under linux?

I am a heavy Vim user and I also use a ton of tmux and a load of bash in my everyday computer activities. In order to optimize my work flow, even more, I would like a way to get a log of all key ...
user avatar
  • 1,245
2 votes
1 answer
159 views

CD with redirect to logger does not work

On Linux, the following cd works fine so cds into tmp: / # cd /tmp tmp # But this does not work (stays at root, nothing appears in /var/log/messages). Why not? / # cd /tmp 2>&1 | /usr/bin/...
user avatar
  • 203
2 votes
1 answer
17k views

Logging incoming request to my nginx proxy server

I would like to log all incoming requests, before it hits my worker nodes.
user avatar
1 vote
1 answer
419 views

connecting to IRC and log all conversations

I would like to setup a tool on my server that automatically connects to a certain irc channel and logs all conversations. Also this tool should welcome a certain user with a certain pre-defined ...
user avatar
  • 24.9k
3 votes
1 answer
41 views

Extract file from completely disconnected machine, possibly via Kernel messages

I have a VPS running inside an OpenStack cloud that has more or less crashed completely - the provider hasn't been able to get any kind of networking on it for over 2 days, seems completely broken on ...
user avatar
10 votes
1 answer
32k views

Remote syslog command line Client

I use logger pretty regularly, but is there a FOSS command line tool for remote submission of syslog messages over the network? Right now, I have to configure a facility/priority pair to submit to a ...
user avatar
  • 15.9k
1 vote
1 answer
3k views

rsyslog && sending data to other host

Using CentOS 6.4. Problem is - that messages from kern.* facility doesn't appear on other server. Tring to send data: # logger -p kern.warning -t TEST "Test warning for remote host KERNEL" # logger ...
user avatar
  • 874
20 votes
3 answers
29k views

Where does `logger` log its messages to in Arch Linux?

The logger command logs an entry via syslog, which usually puts that line to some file like /var/log/messages. If I understand the documentation correctly in Arch Linux all the logging is done ...
user avatar
  • 20.1k
4 votes
1 answer
7k views

How can I use tee and logger -t "some tag:"?

I've seen in another post which shows how to use tee and logger as shown below. tee >(logger) <<< "System Load is OK : $Current_loadadv" >(logger) is bash syntax to create a file ...
user avatar
  • 143
6 votes
1 answer
683 views

What do you use the -t "tag" option for in logger?

When using the "logger" command to write messages to the system logs from scripts, I use the -t "tag" to store the scripts name along side the message it's written to the log. I do this to make ...
user avatar
  • 305
3 votes
1 answer
8k views

Logger command - how to store logs in given file?

Please explain what below command does. logger_cmd="logger -p local0.info ${program-name}[$$]:" $logger_cmd "There is some files missing in ${dest-dir}" How can I write any message in log file? I ...
user avatar
  • 427
0 votes
2 answers
2k views

How to log output to maillog?

On my current Debian setup, I have a file /var/log/mail.log which Dovecot, Postfix, and Spamassassin's spamd all output messages to. I know that the logger command can output to syslog, but is there ...
user avatar
  • 838
7 votes
2 answers
18k views

print message on terminal as well as /var/log/messages using logger

I used below options in script to print on terminal as well as /var/log/messages echo "System Load is OK : $Current_loadadv" echo "System Load is OK : $Current_loadadv" | logger but how can i do ...
user avatar
  • 22.8k