<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#0050d0">
<font size="-1"><font face="Helvetica, Arial, sans-serif">No, you can
not do anything like that. You can hack something really ugly using the
program() output driver and feed it back into syslog-ng, but that'll be
slow and ugly. Though its the only option.<br>
<br>
</font></font><br>
Sent: Wednesday, March 03, 2010 12:21:42 PM<br>
From: peceka <a class="moz-txt-link-rfc2396E" href="mailto:peceka@gmail.com">&lt;peceka@gmail.com&gt;</a><br>
To: Syslog-ng users' and developers' mailing list
<a class="moz-txt-link-rfc2396E" href="mailto:syslog-ng@lists.balabit.hu">&lt;syslog-ng@lists.balabit.hu&gt;</a> <br>
Subject: Re: [syslog-ng] composing file names with system varible
<blockquote
 cite="mid:f0f70e5e1003031121j32f438a7o1b2dd21a46d049d3@mail.gmail.com"
 type="cite">
  <pre wrap="">Hi,

i've looked there already, before posting to mailing list, but i don't
see answer for my question there.
Ok, i saw $HOST macro, but it's not what i'm looking for.
I don't care what `hostname` gives me. For me important thing is
string from file and this string should be used as part of filename.
Or mabye i misunderstand something?

Regards,
p.

On Wed, Mar 3, 2010 at 3:10 PM, Patrick H. <a class="moz-txt-link-rfc2396E" href="mailto:syslogng@feystorm.net">&lt;syslogng@feystorm.net&gt;</a> wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">Look at <a class="moz-txt-link-freetext" href="http://www.balabit.com/dl/guides/syslog-ng-v3.0-guide-admin-en.pdf">http://www.balabit.com/dl/guides/syslog-ng-v3.0-guide-admin-en.pdf</a>
in the "macros" section. You can use variables inside the file() statement.
It even has an example doing exactly what youre wanting to do.

Sent: Wednesday, March 03, 2010 5:48:49 AM
From: peceka <a class="moz-txt-link-rfc2396E" href="mailto:peceka@gmail.com">&lt;peceka@gmail.com&gt;</a>
To: <a class="moz-txt-link-abbreviated" href="mailto:syslog-ng@lists.balabit.hu">syslog-ng@lists.balabit.hu</a>
Subject: [syslog-ng] composing file names with system varible

Hi,

i've on my machine file with some name, for example:
# cat /var/hostname
smeagol

now i want to have log files like this:
/var/log/smeagol-all.log

if i change content of /var/hostname and then restart syslog-ng,
syslog-ng shoud start logging to files with new name.

is it possible? mabye no directly but with some workaround?

regards,
p.
______________________________________________________________________________
Member info: <a class="moz-txt-link-freetext" href="https://lists.balabit.hu/mailman/listinfo/syslog-ng">https://lists.balabit.hu/mailman/listinfo/syslog-ng</a>
Documentation:
<a class="moz-txt-link-freetext" href="http://www.balabit.com/support/documentation/?product=syslog-ng">http://www.balabit.com/support/documentation/?product=syslog-ng</a>
FAQ: <a class="moz-txt-link-freetext" href="http://www.campin.net/syslog-ng/faq.html">http://www.campin.net/syslog-ng/faq.html</a>



______________________________________________________________________________
Member info: <a class="moz-txt-link-freetext" href="https://lists.balabit.hu/mailman/listinfo/syslog-ng">https://lists.balabit.hu/mailman/listinfo/syslog-ng</a>
Documentation:
<a class="moz-txt-link-freetext" href="http://www.balabit.com/support/documentation/?product=syslog-ng">http://www.balabit.com/support/documentation/?product=syslog-ng</a>
FAQ: <a class="moz-txt-link-freetext" href="http://www.campin.net/syslog-ng/faq.html">http://www.campin.net/syslog-ng/faq.html</a>



    </pre>
  </blockquote>
  <pre wrap=""><!---->______________________________________________________________________________
Member info: <a class="moz-txt-link-freetext" href="https://lists.balabit.hu/mailman/listinfo/syslog-ng">https://lists.balabit.hu/mailman/listinfo/syslog-ng</a>
Documentation: <a class="moz-txt-link-freetext" href="http://www.balabit.com/support/documentation/?product=syslog-ng">http://www.balabit.com/support/documentation/?product=syslog-ng</a>
FAQ: <a class="moz-txt-link-freetext" href="http://www.campin.net/syslog-ng/faq.html">http://www.campin.net/syslog-ng/faq.html</a>

  </pre>
</blockquote>
</body>
</html>