a command line utility that sends messages to the syslog daemon
Questions tagged [logger]
36 questions
21
votes
3 answers
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 through systemd, but I cannot find the logger entries…
michas
- 21,190
- 4
- 63
- 93
13
votes
1 answer
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 remote server on the rsyslogd side. I'd like to…
Bratchley
- 16,684
- 13
- 64
- 103
8
votes
2 answers
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 that in single line ?
Rahul Patil
- 24,281
- 25
- 80
- 96
6
votes
1 answer
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 finding entries easier for troubleshooting.
Are there…
David
- 305
- 3
- 9
5
votes
1 answer
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 descriptor that is going to a FIFO, which is then fed to the…
Imagineer
- 153
- 1
- 4
3
votes
1 answer
How to redirect rsyslog messges from a specific unix socket to a different log file without duplication?
I have been trying to implement separate logging for haproxy.
But I end up with duplicate logging and can't separate logs based on the input socket or facility alone.
My sample configuration in haproxy:
Global configuration:
log …
GP92
- 775
- 6
- 15
- 31
3
votes
1 answer
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 wrote below a command, but it didn't show any…
devsda
- 427
- 3
- 10
- 19
3
votes
1 answer
Logging incoming request to my nginx proxy server
I would like to log all incoming requests, before it hits my worker nodes.
Saurabh Jhunjhunwala
- 133
- 1
- 1
- 5
3
votes
1 answer
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 their end. The server itself has already been…
Niels Keurentjes
- 226
- 1
- 6
2
votes
0 answers
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 am having certificate file(.cer), jks file(.jks)…
sks
- 21
- 1
2
votes
1 answer
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 not generating. Is there anything I am missing here?…
A R
- 193
- 2
- 10
2
votes
1 answer
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 need the error output to be logged using the…
Jan Goyvaerts
- 121
- 1
2
votes
1 answer
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.
I would like log a write only once per IP…
antoine
- 21
- 1
2
votes
1 answer
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
$ModLoad imtcp
$ModLoad imuxsock
$ModLoad…
Francois
- 207
- 2
- 9
2
votes
1 answer
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/logger -t Test
/ #
I tried with stripping off this stderr…
robert
- 203
- 2
- 4