Replying to myself, it works only when all these requirements are strictly met : - overriding the value "proxy.config.log.xml_config_file" with another xml config filename instead of the default "logs_xml.config" (it does not work when forcing with this filename in recods.config) - strictly fixing owner & write permissions for ATS user (www under FreeBSD) : + /var/log/trafficserver directory - no syntax error in the xml config file and NO comments at all.
Just to mention that for this xml config file: - comments are may cause an error but - no logs are written when an error is encountered Config tested for ATS 4.1.2 and ATS 4.2.2 with FreeBSD 10 amd64. I don't have any linux box. Denis > Hi, > I can't get custom logs to work, no file is created and no specific > logs even if I force a syntax error in logs_xml.config with an > unclosed comment "<!---" or "<logObject>". It does not seem to be a > permission problem as I also tested with manually creating the log > file. I also unsuccessfully tried with another xml config file using > "proxy.config.log.xml_config_file" and stopping/restarting ATS. > > I looked for that in the users' archives, I found just unanswered > question > http://mail-archives.apache.org/mod_mbox/trafficserver-users/201309.mbox/%[email protected]%3E > > Here is my configuration > ATS 4.1.2 and ATS 4.2.2 (08cd513)/ FreeBSD 10 amd64 > > ==> records.config <== > CONFIG proxy.config.log.logging_enabled INT 3 > CONFIG proxy.config.log.max_secs_per_buffer INT 5 > CONFIG proxy.config.log.max_space_mb_for_logs INT 25000 > CONFIG proxy.config.log.max_space_mb_for_orphan_logs INT 25 > CONFIG proxy.config.log.max_space_mb_headroom INT 1000 > CONFIG proxy.config.log.custom_logs_enabled INT 1 > > ==> logs_xml.config <== > <LogFormat> > <Format = "%<chi> - - [%<cqtn>] \"%<cqhm> %<cquup>\" %<pssc> > %<psql> \"%<{Referer}cqh>\" \"%<{User-Agent}cqh>\"" /> > <Name = "httpd_combined" /> > </LogFormat> > <LogObject> > <Format = "httpd_combined" /> > <Filename = "access" /> > <RollingEnabled = "1" /> > <RollingOffsetHr = "23" /> > <Mode = "ascii" /> > </LogObject> > > > Thanks for any advice! > Regards, > Denis >
