I'm using Solaris and have an application that writes to a log file /app/data/log/foo_log.021118.

Am I able to use syslog to forward that specific log file to a remote server?

Should I put something like

*.*/app/data/log/foo_log.021118       @remoteserver

in my /etc/syslog.conf ?


  • I don't know what syslog program Solaris provides, but if it is rsyslog and a relatively recent version of it then you can use module imfile, see my answer to a similar question here.
    – meuh
    Nov 2, 2018 at 15:46

1 Answer 1


Not directly, no.

Since your application is not using syslog to begin with, syslog has no way to intercept that data. The application would need to be reconfigured to use syslog instead of log files.

Alternatively, you could use the logger utility to post-hoc send the log file via syslog:

logger -f /app/data/log/foo_log.021118

where you could then configure appropriate facility/priority pairs in /etc/syslog.conf (and then use -p that-facility.that-priority in the call to logger). You would probably want to send the log file via logger after the application has finished writing to it; the timestamp implies a daily log file (2 Nov 2018, I'm assuming, based on today's date), so you could set up a job to send yesterday's log file.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .