Speed Up Development with Logger

One of the first reactions we get when introducing Logger to developers and managers is that it will slow developers down by having to write additional logger.log statements. This couldn't be further from the truth.

Instead of manually typing out each log statement you can easily use a text expander. Text expanders allow you to register shortcuts which then auto expand when you're developing.

For example, when I type ologl (the prefixing "o" stands for Oracle shortcuts in my setup) in any editor it expands to logger.log('', l_scope);. The following video demonstrates some shortcuts that I use (full details below):

Popular ones I use are:


logger.log_error('', l_scope, null, l_params);


logger.log(logger.sprintf('TODO: %s', TODO), l_scope);


select *
from logger_logs_5_min
where 1=1
  and scope like '%%'
-- and client_identifier like 'MD%'
--  and id > TODO
order by 1 desc;

oproc - This will expand to a procedure template as defined in the Best Practices document.

Of course you can use the same technique for other code snippets that you frequently use.

They're lots of great apps out there for text expanders. Some that I recommend are:

  • Mac: aText
  • Windows: PraseExpress
  • SQL Developer: Jeff Smith as a great blog post about using the built in text expander in SQL Developer.

Feel free to recommend other text expander apps in the comments.

For more development tips please read the entire series: