In osl you can use the "log" command in the same way that the "print" function is used in python, or the "console.log" method is used in javascript. It simply logs a value to the console for you to read.
Values from log, warn and error, all go to the browser's debug console.