Comment SPAM has been an increasing problem on lekkimworld.com for the last couple of months. Today I implemented a simple mod_rewrite trick to ignore all HTTP POSTs without a referer and it seems to work beautifully. Some still get through but the numbers has dramatically decreased.
Writing log messages in Sametime 7.5 plugins
Unfortunately the Sametime 7.5 SDK doesn’t contain any information that I can find on how to use log and debug messages in custom plugins. Furthermore all the Sametime 7.5 articles on developerWorks I have seen use System.out which is really a no, no. This post contain some information on logging that I have found out myself – partly through looking around in the Sametime 7.5 Connect client installation and partly by trial-and-error.
FYI: I’m doing a fair bit of Sametime 7.5 plugin development at the moment. For one because it’s fun and second because I’m writing an article for THE VIEW (slated for the March/April issue) on Sametime 7.5 development.
Introduction
Logging is at the heart of any development project whether that be a Notes database or a Java application. You can of cause resort to using System.out / System.err for logging but that’s clearly a no, no! If you are in doubt why I suggest you start here. Once you come to the conclusion that you really should be using a logging framework there basically is two options:
- java.util.logging (available directly in the JDK since JDK 1.4)
- Apache log4j
Many libraries will furthermore use Jakarta Commons Logging to isolate themselves from the underlying logging technology. In part because they cannot tell which logging framework will be used by clients and because it affords the client the choice.
However in the case of the Sametime 7.5 Connect client the choice has been made for you since Sametime 7.5 uses java.util.logging. You can choose to use Commons Logging but then the logging levels will not fit the ones used in Sametime.
I would suggest you stay with java.util.logging.
Please note: The way logging works while developing plugins in Eclipse is very much different from how it works in the *real* client. When developing all logging, incl. System.out, goes to the console.
Using java.util.logging
Obtaining a java.util.logging.Logger instance is easy:
Logger log = Logger.getLogger(this.getClass().getName());
I suggest you follow the above example and use the class name as the logger name which is also a best practice and the way that IBM does it.
Once you have the Logger-instance you can use it to log information using the different logging Levels (see the Javadoc for more information on java.util.logging).
Configuring logging in Sametime 7.5
The logs written are placed in the Sametime-directory under your using profile hereafter called the log-directory. On my Windows laptop this is “C:Documents and Settingslekkim.HQApplication DataSametime”. The logging itself is configured from the sametime.properties file in the Sametime 7.5 Connect client directory (again on my Windows laptop this is “C:Program FilesIBMSametime 7.5”).
The top of my default sametime.properties looks like this:
## G11N DNT ## Logging properties .level=INFO logger.filename=sametime.log logger.includeClassInfo=true logger.toConsole=true logger.level=ALL logger.limit=20000000 logger.count=7 org.apache.axis.level=INFO redirectSystemOutput=true ## app properties ... ...
By default log-messages goes to sametime.log.0 in the log-directory with the maximum level of INFO (top bold line). To diagnose issues increase the log level to FINE, FINER, ALL etc. Be aware that the finer levels will produce *lots* of output. Note that messages written to System.out is directed to System.err by default (the second line in bold). To get this information change the redirectSystemOutput to false.
Doing this will cause output to be written to sametime.log in the log-directory instead. Restarting the Sametime 7.5 client while redirectSystemOutput is false will rotate the previous sametime.log to sametime.log.previous.
The nitty-gritty details
It appears that most of the java.util.logging configuration is done through the rcpinstall.properties file in /plugins/com.ibm.rcp.base_6.1.0.0-20060714/config/muservice. Although I wouldn’t suggest changing the file itself it may be beneficially to peruse the file to see how it’s done.
If you really want to know that is… 😉
Conclusion
It appears that Sametime uses java.util.logging and that is is quite straight forward to use – once you know how… Logging levels are easily controlled from sametime.properties and extending the logging framework to do central logging should be easily accomplished.
Happy logging…
Re: Still a Domino Developer
There’s quite a heated discussion going on at the moment at edbrill.com and at codestore.net. I’m a bit late to chime in but here’s my 5 cents…
I enjoy working in Notes/Domino and overall I think that the platform really kicks a…! Does the product have its shortcomings? Sure – but that is true for most Swiss-army knife products. Could things be done better? Sure – but so it’s true for many other applications and environments. Do I always agree with the decisions of Lotus? Nope – but I hardly ever agree with anybody… 🙂
Being serious for a moment… My number one grievance with Lotus is not about feature XYZ but rather that that the bug/feature submission process for many IBM products, incl. Lotus Notes, is opaque. Once the bug/feature request is submitted it is very difficult to get the *real* status on the issue unless you know someone on the inside.
Would it be possible to make bug/feature request submission more transparent? What if the bug/feature request database was available on the web for all to peruse? Bug tracking systems like Atlassian JIRA and Bugzilla have functionality for voting on bugs. In this way all customers and business partners could see what’s going on and what’s actively being developed. It could also help Lotus to gauge what’s really important to developers and what’s not.
While I know that a process is probably not always possible I think it would go a long way to give developers an outlet for issues and ideas. It could be that I as an user wouldn’t be allowed to create issues in the database myself but it would give me a chance to keep track of my issues.
Just a thought…
Sametime 7.5 client language when doing plugin development

If you are doing any Sametime 7.5 plugin development you might have noticed that the client always starts up in your local language – Danish in my case. If your native language isn’t English and you’re developing international plugins you might want to run the Sametime client in English instead which you can do by adding a command line parameter in your launch configuration.
To do this open your launch configuration, go to the Arguments-tab and add “-nl <locale>” (without the quotes) in the “Program arguments” field. The specified locale can be any valid Java Locale such as US, DK or DE.
Lotusphere 2007: Room and time slot allocation is done

The room and time slot allocation is done as listed on the office Lotusphere 2007 page and in the session database. It looks like I’m one of those early birds and that I’m speaking i Swan 3-4.

What to do when POP3 is not allowed in Microsoft Outlook?
I’m helping a customer migrate e-mails from a Notes mail databases to Microsoft Outlook MSG-file format today. For this process we needed to extract all the e-mails using Outlook POP3 access to Domino. Nice and easy. Unfortunately the installed Outlook client didn’t allow us to configure a POP3 account in Outlook. What to do? Look to Google to provide the answer.
Re:Removing the slash screen from Sametime 7.5
As mentioned in my SnTT post on 5 October 2006 (post) you can remove the splash screen from Sametime 7.5 by hacking the config.ini file in the configuration-directory. A by far easier way is simply to add -noSplash as a command line argument to sametime.exe in your Windows shortcut or to the sametime executable on Linux.
A little easier… 😉
Central repository of known locations for Sametime 7.5
If you have Sametime 7.5 installed and use the location awareness you’ll have a file called locprofile-config.xml holding the locations you have configured so far (mine is in C:Documents and Settingslekkim.HQApplication DataSametime.metadata.pluginscom.ibm.collaboration.realtime.location).
The locations are identified by the network you are connected to and is identified by the current IP-subnet and the MAC address of the default gateway.
<?xml version="1.0" encoding="UTF-8"?>
<locprofconfig>
<locprofiles>
<locprofile profilename="192.168.1.0 00:09:7C:2B:74:88 ">
<locations>
<locip>192.168.1.0</locip>
<macaddr>00:09:7C:2B:74:88</macaddr>
</locations>
<personalloc>it-inspiration hq</personalloc>
<city>københavn k</city>
<country>DK</country>
<postalcode>1058</postalcode>
<primphone>70223141</primphone>
<shareloc>true</shareloc>
<timezone>Central European Time (GMT +1)</timezone>
</locprofile>
<locprofile>
...
</locprofile>
<locprofile>
...
</locprofile>
</locprofiles>
</locprofconfig>
At present the file is person dependent but since it is part of a plugin but I think it would be really cool if parts of the file could be populated from a central repository via an extension point. This way the Sametime Connect client would automatically display the correct location of the user throughout the company without each user having to update the file themselves. It would also mean that the information could be entered and displayed in a consistent manner.
Of cause the user would still have to specify the location details for custom locations such as hotels, home work stations etc. but I think it would make life easier for the majority of users.
Just an idea…
Gems from the 7.0.2 release notes
- Mail file
- Allow user to expand public groups to remove certain addresses
The functionality is created using a special $-field called $ExpandGroups which you might want to use in your own applications:FIELD $ExpandGroups := @DeleteField; @SetField("$ExpandGroups"; "3"); @Command([ViewRefreshFields]) - Calendar documents which are marked ‘Private’ now get populated in the busytime.nsf without calendar details, but still visible if a delegate can access the mailfile.
- Domino Designer
- Support for additional DXL design elements
New elements for Shared Columns, Shared File Resources, and Shared Stylesheet Resources have been added. - User-defined HTML tag attributes
User-defined attributes can now be added to the tag generated by the web engine. When the field $$HTMLTagAttributes is present on a form, its contents are placed in the attribute list of the tag. For more information, see “Additional HTML-related field attributes” in these release notes - Custom declaration
Users can now specify a custom declaration on a per form basis. When the field $$HTMLFrontMatter is present on a form, its contents will be placed in the generated HTML, ahead of the tag, and the web server will not generate anything there automatically. For more information, see “Additional HTML-related field attributes” in these release notes. - Domino Server
- Allow for basic authentication of some URLs
Domino 7.0.2 allows certain URLs, for example those that generate RSS feeds, to use Basic Authentication, even if Domino Session Authentication is in effect.
Apart from the changes listed above a bunch of notes.ini variables has been made obsolete so I recommend you go through the list yourself. There are a number of iNotes variables in there (iNotes_WA_*).
7.0.2 also adds iCal support but as a developer you might want to know that the iCal import is limited to 500 documents per file. The following is from the release notes: “Users can import iCalendar files with a maximum of 500 documents; use multiple imports for more than 500 documents.” This could be a problem if you are going to import large calendars. Unfortunately there isn’t a programmatic way of importing the iCal file so you have to go through the File menu.
As always you want to pay special attention to chapter 3: Known limitations, problems, and workarounds.
Direct link to the PDF version of the Notes/Domino 7.0.2 release notes.
Finding Installshield Tuner on Passport – impossible?
Now I have spent the better part of the morning trying to locate InstallShield Tuner for Notes on the Passport site without any luck. The part number for Notes 7 listed in technote 1226984 (p/n: C47CQNA) doesn’t help either since they appear to be for Microsoft Outlook for Domino… 🙁
I’m quite sure it used to be there…
Update: Apparently the key is to search for p/n CR31VNA on Passport. Why I simply cannot search for the p/n of the actual install (C84T5NA) still doesn’t make any sense to me. Via notes.net…