Apache::TS::Config::Records
Manage the Apache Traffic Server records.config file
- Provided by: trafficserver-dev (Version: 5.3.0-2ubuntu2)
- Source: trafficserver
- Report a bug
Manage the Apache Traffic Server records.config file
#!/usr/bin/perl
use Apache::TS::Config::Records;
my $r = new Apache::TS::Config::Records(file => "/tmp/records.config");
$r->set(conf => "proxy.config.log.extended_log_enabled",
val => "123");
$r->write(file => "/tmp/records.config.new");
This module implements a convenient interface to read, modify and save the records.config file as used by Apache Traffic Server.
Instantiating a new Config::Records class, with a file provided, will automatically load that configuration. Don't call the load() method explicitly in this case.
The following are methods in the Records class.
my $r = new Apache::TS::Config::Records(file => $fname);
[<line string>, [value split into 4 fields, flag if changed]
You probably shouldn't modify this array.
$r->set(conf => "proxy.config.exec_thread.autoconfig",
val => "0");
conf is short for "config", val is short for "value", and all are acceptable.
$r->remove(conf => "proxy.config.exec_thread.autoconfig");
$r->append(line => "");
$r->append(line => "# My local stuff");
$r->set(conf => "proxy.config.dns.dedicated_thread",
val => "1");
$r->write(file => "/etc/trafficserver/records.config");
Apache::TS::Config