Hi,
Craig Johnson wrote:
> I have a logging routine that writes output to a file and I would like to be
> able to have the output also appear on the screen as the macro is running. I
> do not want the output to appear in popup windows as the macro is being
> executed with 'soffice -headless'.
>
> Is it possible to print to STDOUT (and/or STDERR) from a Staroffice basic
> macro?
you can use com.sun.star.logging.ConsoleHandler.
Something like this:
dim msg as new com.sun.star.logging.LogRecord
msg.Message = "Hello"
msg.Level = com.sun.star.logging.LogLevel.ALL
dim obj as object
obj = createUnoService("com.sun.star.logging.ConsoleHandler")
obj.initialize(Array())
obj.Level = com.sun.star.logging.LogLevel.ALL
obj.publish(msg)
More info:
http://api.openoffice.org/docs/common/ref/com/sun/star/logging/module-ix.html
Regards,
Denis
__________________________________________________
Do You Yahoo!?
Sie sind Spam leid? Yahoo! Mail verfügt über einen herausragenden Schutz gegen
Massenmails.
http://mail.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]