Writing to ULOG
By now, you should have noticed files such as ULOG.mmddyy
appearing in the directory when you start the Tuxedo application. mmddyy consists of the current month, date, and year. So far, this log file contains only messages created by Tuxedo itself.
Tuxedo also exposes a function to write messages to this log file. The function is called userlog
and can be used from both Tuxedo clients and servers. Here is an example of how to use it:
import tuxedo as t t.userlog("Hello, ULOG")
After calling the function, a line similar to the following should be present in the ULOG:
181928.15c365dcb562!?proc.1737.2520094528.-2: Hello, ULOG
Using the userlog
function is convenient for code examples and quick debugging but it lacks many features we take for granted. Every logging library provides features such as logging levels, formatters, filters, and many more that the ULOG is lacking. For a real-world application, you should leave ULOG for Tuxedo system messages...