linelog to two destinations
Hi folks, I think I know the answer to this ("no") but I thought I'd ask anyway. Is it possible to configure a linelog instantiation to log to syslog AND a file at the same time? If not, I guess my options are two load two different linelog instantiations with different values for "filename", or to send it all to syslog and let syslog try and work out what the virtual-server-specific filenames should be. Thanks, Jonathan
On 13 Jan 2016, at 09:39, Jonathan Gazeley <Jonathan.Gazeley@bristol.ac.uk> wrote:
Hi folks,
I think I know the answer to this ("no") but I thought I'd ask anyway. Is it possible to configure a linelog instantiation to log to syslog AND a file at the same time?
No, that's the point of having module instances.
If not, I guess my options are two load two different linelog instantiations with different values for "filename", or to send it all to syslog and let syslog try and work out what the virtual-server-specific filenames should be.
Filename gets expanded. Just use %{Virtual-Server} as part of the filename if you want to log to different files based on the virtual server. -Arran Arran Cudbard-Bell <a.cudbardb@freeradius.org> FreeRADIUS development team FD31 3077 42EC 7FCD 32FE 5EE2 56CF 27F9 30A8 CAA2
On 13/01/16 14:45, Arran Cudbard-Bell wrote:
Filename gets expanded. Just use %{Virtual-Server} as part of the filename if you want to log to different files based on the virtual server.
Yes, this is exactly what I do at the moment. I now want to log to syslog as well as files without having to duplicate the config.
On Wed, Jan 13, 2016 at 02:49:08PM +0000, Jonathan Gazeley wrote:
On 13/01/16 14:45, Arran Cudbard-Bell wrote:
Filename gets expanded. Just use %{Virtual-Server} as part of the filename if you want to log to different files based on the virtual server.
Yes, this is exactly what I do at the moment. I now want to log to syslog as well as files without having to duplicate the config.
modules { linelog { filename = "%{Tmp-String-0}" ... } } policy { log_syslog { update control { Tmp-String-0 := "syslog" } linelog } log_file { update control { Tmp-String-0 := "/var/log/file" } linelog } } authorize { log_syslog log_file } ? Matthew -- Matthew Newton, Ph.D. <mcn4@le.ac.uk> Systems Specialist, Infrastructure Services, I.T. Services, University of Leicester, Leicester LE1 7RH, United Kingdom For IT help contact helpdesk extn. 2253, <ithelp@le.ac.uk>
On 13 Jan 2016, at 09:49, Jonathan Gazeley <Jonathan.Gazeley@bristol.ac.uk> wrote:
On 13/01/16 14:45, Arran Cudbard-Bell wrote:
Filename gets expanded. Just use %{Virtual-Server} as part of the filename if you want to log to different files based on the virtual server.
Yes, this is exactly what I do at the moment. I now want to log to syslog as well as files without having to duplicate the config.
Reference a common template in the linelog modules, then you won't duplicate any of the config. templates { my_linelog_template { common_config_item = 'common_value' } } linelog inst1 { $template my_linelog_template } linelog inst2 { $template my_linelog_template } -Arran Arran Cudbard-Bell <a.cudbardb@freeradius.org> FreeRADIUS development team FD31 3077 42EC 7FCD 32FE 5EE2 56CF 27F9 30A8 CAA2
participants (3)
-
Arran Cudbard-Bell -
Jonathan Gazeley -
Matthew Newton