The undocumented procedure kdswrt in dbms_system writes custom messages to the alert log.
Syntax:
Valid Destination values are
1 Write to a trace file
2 Write to the alert log
3 Write to both trace and alert log
sys.dbms_system.ksdwrt(destination, message);
Valid Destination values are
Example:
begin
sys.dbms_system.ksdwrt(2, 'Custom Message');
end;
/