Appendix B: The LogView Tag

Table of Contents Introduction Administrator User Appendix
| Appendix Appendix A: Available Functions Appendix B: The LogView Tag Appendix C: Pike Regexp Syntax
  | Appendix B: The LogView Tag The LogView module provides a special RXML tag, , which provides an easy way of inserting statistics reports in ordinary RXML documents. The usage is simple: `<logview options>` where the options are some of the following: LogView options help Display this text. manual Display the LogView manual. list-groups List all statistics groups. list-reports List all available reports. list-defaults Report variable values, including default values. group=`statistics-group` Select the statistics group for which to make a report. report=`report` Select what to report. Some available report types are 'Hits', 'Bandwidth', 'Popular pages', 'Average session length' and 'Return code summary'. Exactly which types are available may depend on the exact version and configuration of your LogView installation; use the list-reports option to find out which report types are available on a particular server. op=`[append|sum]` This option is used to select whether to 'append' or 'sum' the statistics over the specified period (see below). display=[table|line-chart|bar-chart| sum-bars|pie-chart|3d-pie-chart|ascii|export] This selects the format in which to display the report. max=`num` Maximum number of rows in the result. unit=`[year|month|week|day|hour]` Select the granularity of the report to be produced. per=`[year|month|week|day|hour]` Selects a second level of reported time resolution, and must have a values greater or equal to unit. Available units are the same as for unit. The difference between unit and per is that the former determines the width of the periods to sum to produce individual sample points, while the latter only affects how the values should be reported. The difference is perhaps easiest to see in the bar chart report type, where granularity determines the number of bars, while per determines how to label the bars; if granularity is greater than per, bars within the same per period will have the same label. When using op=sum, corresponding unit values from different per periods will be totaled, instead of being presented separately. For instance, with: `report=bandwidth op=sum unit=hour per=day` the diagram/table produced will show how the bandwidth usage varies at different times of day, during the specified time period (see below). Setting unit and per to the same value, and using op=sum, will have the effect of producing a single sum for the whole time period specified (this is really only useful for report=table). from-year, from-month, from-day These options select the start of the time period for which to produce a report. Apart from plain digit values, the values can be specified with a '-' prefix, indicating an offset from the current day/month/year, so that e.g. `from-day=-3` means "three days ago". `from-day` can also take values like `this-friday` and `last-tuesday`, as well as `today` and `yesterday`. `from-month` can take month names, as well as `this-month` and `last-month`. to-year, to-month, to-day These options select the end of the time period for which to produce a report. The values are specified just as for the corresponding from- options. LogView example
  `<logview report='Hits' unit=day per=month display=line-chart>`