[strongSwan] Logging to file

Dan Cook dan.cook at illum.io
Mon Jul 1 23:00:10 CEST 2013


I am trying to redirect all logging to a file.
I have followed the example listed on docs page, but I am still seeing
the following entries in "secure" file on CentOS.

Jul  1 16:49:20 ip-10-170-95-110 ipsec_starter[27645]: charon stopped
after 200 ms
Jul  1 16:49:20 ip-10-170-95-110 ipsec_starter[27645]: ipsec starter stopped
Jul  1 16:49:21 ip-10-170-95-110 ipsec_starter[28019]: Starting
strongSwan 5.0.4 IPsec [starter]...
Jul  1 16:49:21 ip-10-170-95-110 ipsec_starter[28028]: charon (28030)
started after 40 ms

Is there a way to redirect all logging to a file from all processes?

Dan

My strongswan.conf:

charon {

# number of worker threads in charon
threads = 16

# send strongswan vendor ID?
# send_vendor_id = yes

plugins {
}

    # Two defined file loggers. Each subsection is either a file
    # in the filesystem or one of: stdout, stderr.
    filelog {
        /home/ipsec/charon.log {
            # add a timestamp prefix
            time_format = %Y-%m-%dT%T%z
            # loggers to files also accept the append option to open files in
            # append mode at startup (default is yes)
            append = yes
            # the default loglevel for all daemon subsystems (defaults to 1).
            default = 1
            # flush each line to disk
            flush_line = yes
        }
        stderr {
            # more detailed loglevel for a specific subsystem, overriding the
            # default loglevel.
            ike = 2
            knl = 3
            # prepend connection name, simplifies grepping
            ike_name = yes
        }
    }
# ...
}




More information about the Users mailing list