~yolanda.robla/ubuntu/saucy/freeradius/dep-8-tests

« back to all changes in this revision

Viewing changes to raddb/modules/linelog

  • Committer: Bazaar Package Importer
  • Author(s): Josip Rodin
  • Date: 2009-11-23 03:57:37 UTC
  • mto: This revision was merged to the branch mainline in revision 7.
  • Revision ID: james.westby@ubuntu.com-20091123035737-snauioz5r9tf8sdr
Tags: upstream-2.1.7+dfsg
ImportĀ upstreamĀ versionĀ 2.1.7+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# -*- text -*-
 
2
#
 
3
#  $Id$
 
4
 
 
5
#
 
6
#  The "linelog" module will log one line of text to a file.
 
7
#  Both the filename and the line of text are dynamically expanded.
 
8
#
 
9
#  We STRONGLY suggest that you do not use data from the
 
10
#  packet as part of the filename.
 
11
#
 
12
linelog {
 
13
        #
 
14
        #  The file where the logs will go.
 
15
        #
 
16
        #  If the filename is "syslog", then the log messages will
 
17
        #  go to syslog.
 
18
        filename = ${logdir}/linelog
 
19
 
 
20
        #
 
21
        #  The default format string.
 
22
        format = "This is a log message for %{User-Name}"
 
23
 
 
24
        #
 
25
        #  This next line can be omitted.  If it is omitted, then
 
26
        #  the log message is static, and is always given by "format",
 
27
        #  above.
 
28
        #
 
29
        #  If it is defined, then the string is dynamically expanded,
 
30
        #  and the result is used to find another configuration entry
 
31
        #  here, with the given name.  That name is then used as the
 
32
        #  format string.
 
33
        #
 
34
        #  If the configuration entry cannot be found, then no log
 
35
        #  message is printed.
 
36
        #
 
37
        #  i.e. You can have many log messages in one "linelog" module.
 
38
        #  If this two-step expansion did not exist, you would have
 
39
        #  needed to configure one "linelog" module for each log message.
 
40
 
 
41
        #
 
42
        #  Reference the Packet-Type (Access-Request, etc.)  If it doesn't
 
43
        #  exist, reference the "format" entry, above.
 
44
        reference = "%{%{Packet-Type}:-format}"
 
45
 
 
46
        #
 
47
        #  Followed by a series of log messages.
 
48
        Access-Request = "Requested access: %{User-Name}"
 
49
        Access-Reject = "Rejected access: %{User-Name}"
 
50
        Access-Challenge = "Sent challenge: %{User-Name}"
 
51
 
 
52
        #
 
53
        #  The log messages can be grouped into sections and
 
54
        #  sub-sections, too.  The "reference" item needs to have a "."
 
55
        #  for every section.  e.g. reference = foo.bar will reference
 
56
        #  the "foo" section, "bar" configuration item.
 
57
        #
 
58
 
 
59
        #
 
60
        #  Used if:     reference = "foo.bar".
 
61
        foo {
 
62
            bar = "Example log.  Please ignore"
 
63
        }
 
64
 
 
65
        #
 
66
        #  Another example:
 
67
        #      reference = "Accounting-Request.%{%{Acct-Status-Type}:-unknown}"
 
68
        #
 
69
        Accounting-Request {
 
70
                Start = "Connect: [%{User-Name}] (did %{Called-Station-Id} cli %{Calling-Station-Id} port %{NAS-Port} ip %{Framed-IP-Address})"
 
71
                Stop = "Disconnect: [%{User-Name}] (did %{Called-Station-Id} cli %{Calling-Station-Id} port %{NAS-Port} ip %{Framed-IP-Address}) %{Acct-Session-Time} seconds"
 
72
 
 
73
                #  Don't log anything for these packets.
 
74
                Alive = ""
 
75
 
 
76
                Accounting-On = "NAS %C (%{NAS-IP-Address}) just came online"
 
77
                Accounting-Off = "NAS %C (%{NAS-IP-Address}) just went offline"
 
78
 
 
79
                # don't log anything for other Acct-Status-Types.
 
80
                unknown = ""
 
81
        }
 
82
 
 
83
}