Current User: Guest Login
Please consider registering

Lost Your Password?

Search Forums:


Minimum search word length is 4 characters – Maximum search word length is 84 characters
Wildcard Usage:
*  matches any number of characters    %  matches exactly one character

Possible to reuse another Log value in Extra Section

Reply to Post Add a New Topic

2:40 pm
November 29, 2009



Hi There

I would like to be able to reuse the %logname value again in the extra section without modifying my logformat values.  What I am trying to achieve is to see an authenticated username to a specific page.  I have the extra section working fine using the value HOST, but rather than displaying that value i would like to use %logname.  If i edit my LogFormat value and change %logname to %extra1 I can generate the page I need, but then this messes up the entire Authenticated Users section.

Is there a way around this?


Matt Short

3:19 pm
November 29, 2009



posts 1125


There is no easy solution as %logname  is not known within extra section.

I did not look at it in details, but I guess that it would not be too difficult to modify  to add a piece of code adding support for %logname  in extra sections.

4:20 pm
November 29, 2009



Hi Jean-Luc

I've looked at the code and found that I needed to add the following, under the # Analyze: Extra section

elsif ( $conditiontype eq 'LOG_NAME' ) {
                    if ($Debug) {
"  Check condition '$conditiontype' must contain '$conditiontypeval' in '$field[$pos_logname]'",
                    if ( $field[$pos_logname] =~ /$conditiontypeval/ ) {
                        $conditionok = 1;

Then under the # Determine actual column  value to use

                elsif ( $rowkeytype eq 'LOG_NAME' ) {
                    if ( $field[$pos_logname] =~ /$rowkeytypeval/ ) {
                        $rowkeyval = "$1";
                        $rowkeyok  = 1;

With this you could use ANY value not already setup from your log files.  The key is the name LOG_NAME is the value used in the extrasection and the pos_logname is the value recorded from the log file.  Now when I run my extra section, i get the authenticated users to a specific web page, Very Very handy.


Matt Short

11:49 pm
November 29, 2009



posts 1125

Excellent. Thanks for the input.

7:55 am
December 8, 2011



Thanks Matty for posting this solution, works as a charm also for METHOD –> pos_method to list uploads and downloads of my FTP server.


This patch seriously needs to be included for ALL log fields, I really can't understand the current limitation.

Reply to Post

Reply to Topic:
Possible to reuse another Log value in Extra Section

Guest Name (Required):

Guest Email (Required):

NOTE: New Posts are subject to administrator approval before being displayed

Confused Cool Cry Embarassed Frown Kiss Laugh Smile Surprised Wink Yell
Post New Reply

Guest URL (required)

Math Required!
What is the sum of:
12 + 1

About the Forum

Forum Timezone: UTC 1

Most Users Ever Online: 302

Currently Online:
12 Guests

Currently Browsing this Topic:
1 Guest

Forum Stats:

Groups: 2
Forums: 9
Topics: 639
Posts: 2710


There are 257 Members
There have been 304 Guests

There is 1 Admin
There is 1 Moderator

Top Posters:

cssfsu – 55
deepakgupta – 34
albert_newton – 30
cosminpana – 20
DTNMike – 19
ahtshun83 – 17

Recent New Members: raju, todd2taylor, sbdcunha, mansigill1987, ThomasDuh, ThomasKic

Administrators: Jean-Luc (1125 Posts)

Moderators: Jean-Luc (1125 Posts)