[strongSwan] Logging to file

Dan Cook dan.cook at illum.io
Mon Jul 1 23:12:15 CEST 2013


Noel,

Thank you for your reply.  I am looking to redirect all logging from
syslog to a different file using the filelog option in
strongswan.conf.  I am OK with the ipsec_starter logging, I just want
it to log where I tell it to log ... ;-)

Cheers,
Dan

On Mon, Jul 1, 2013 at 2:08 PM, Noel Kuntze <noel at familie-kuntze.de> wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hello Dan,
>
> charon {
>     # regular blah with threads and such
>     syslog {
>                 auth
>                         {
>                             default=-1
>                         }
>                 daemon
>                         {
>                              default=-1
>                  }
>    # more blah
> }
>
> Loglevel -1 means, that it's completely silent.
> I hope this helps.
>
> Regards,
> Noel
> Am 01.07.2013 23:00, schrieb Dan Cook:
>> 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
>>         }
>>     }
>> # ...
>> }
>>
>> _______________________________________________
>> Users mailing list
>> Users at lists.strongswan.org
>> https://lists.strongswan.org/mailman/listinfo/users
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v2.0.20 (GNU/Linux)
> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
>
> iQIcBAEBAgAGBQJR0e/qAAoJEDg5KY9j7GZYfwEP/3CeLEcQu+yoeDYuU7CdovMN
> ESlElniVmdmnPAxDTX7MTzUriPyF7d7t060A3Z8hzgO4qRsqduPz2eJBOrHzVYSe
> mUvYyo0hDAwGxjsUo+SBjwx4P5WIh99nAynWHQWnJFPUZNEPdlLSmvOXnIBLZsHc
> /0kzKaIPtuLHTjrcqowhX0FO2eEVmWGekvhPQg6Dcxr4ro750ZczV+m4ioJq60M9
> nNTI47EcNE+b53MWFNN/GGMgXLA6JbL/fu9maqufYIv4J4CqJ57clWvtM3wAoWM/
> BgrgK+Umnjfae1Xdb3ykcKklZ003/IBcqIHKwn2XQeRwEJNER8M9x1eJfIMw5eBX
> lqLJK/KnXtsZ+Hw3EXnx+peugMsEfXVpoLh9YFKjPpnPX5IP27Fn/8MpfhqunKw7
> JGtmluun+CTEig2PAOYN9X6eBNo99G5tr/06K7MlZPfAS27At5GJj3xI7utebxWH
> RG2odKsrcXExN4NUhGmu7OAmpmI54f9Neh6aZ6pkEXjhdNbt1ALN8Oku93sLam9f
> HdXnDGbEq2KzyKMFI+5DGqQs58Yjup1Hq00RRbZnPJXH3ymUhy9DdoSbAMx1U63V
> p7Nq5ptfrd1ro6lldkGpw+MjpqRijWai5qc54c/YvvAnFLHPmWTsY1Vz5K2RZ6iK
> 51li7TeYP8urE7B39S3q
> =TTRn
> -----END PGP SIGNATURE-----
>




More information about the Users mailing list