MailNews:Logging
The MailNews logging mechanism is activated by setting couple environment variables before running a MailNews application.
Logging options within MailNews
The following protocols may be logged within MailNews applications (SeaMonkey/Thunderbird) currently:
- mime
- imap
- nntp
- smtp
- pop3
- ldap
These are all available in debug and release builds.
The following items may or may not be available in release builds, but will be available in debug builds:
- imapoffline
- bayesianfilter
- msgcompose
- mapi
- nsaboutlookcardlog
- nsabwinhelperlog
- ldapautocomplete
- nswabaddressbook
- nsaboutlookdirectorylog
- movemail
- msgbiff
- msgpurge
- appleimportlog
- import
Environment Variables to set
Two environment variables that should set are;
- NSPR_LOG_MODULES: Module name and level separated by colon
- e.g. "ldap:5;smtp:3"
- NSPR_LOG_FILE: Path to the log file
- If NSPR_LOG_FILE is not set, then the output will be logged to the console where the application was launched.
On all platforms, the log is written over every time you re-launch any application which uses mozilla components.
Logging level
The number in the NSPR_LOG_MODULES example above specifies the level of logging you want - a lower number reduces the amount of information that is logged to the file.
The numbers are supposed to have the following meaning:
- PR_LOG_NONE = 0, /* nothing */
- PR_LOG_ALWAYS = 1, /* always printed */
- PR_LOG_ERROR = 2, /* error messages */
- PR_LOG_WARNING = 3, /* warning messages */
- PR_LOG_DEBUG = 4, /* debug messages */
Specifying Environment Variables to Thunderbird/SeaMonkey
TODO (Migrate).
See MailNews troubleshooting for details.