-- test_write.sql

DECLARE
  first person.firstname%TYPE;
  last person.lastname%TYPE;
BEGIN
  logger.open('jane_doe_test.log');
  logger.write('Logging started.');

  SELECT firstname, lastname
    INTO first, last
    FROM person
   WHERE id = 7881;
  logger.write('Person 7881 is ' || first || ' ' || last);

  logger.write('Logging ended.');
  logger.close;
END;
/
