The interpreter doesn’t have built-in logging features, and it probably won’t (I don’t believe libraries should be “bloated” by having built-in support for a bunch of different database engines, etc.).
If you’re concerned about multi-user access, something like a MySQL database would be a good way to handle logs. Or to go with flat files, have one log for each user who chats with the bot (and therefore, only one bot process is likely to write to the file at the same time). A database is the most sure way to go, though. Maybe a schema like this:
CREATE TABLE chat_log (
id serial not null,
timestamp datetime default now(),
name varchar(32) not null,
message text not null,
reply text not null,
);
And Perl code like,
my $reply = $rs->reply($user, $message);
$dbh->prepare("INSERT INTO chat_log SET name=?, message=?, reply=?");
$dbh->execute($user, $message, $reply);