canmove, Confirmed users
2,081
edits
m (nits) |
(clean up (and in some cases remove) imap references. Add note loglevel 5 is not recommended for imap. Other nits) |
||
Line 13: | Line 13: | ||
Also, we have two types of logging: | Also, we have two types of logging: | ||
* [[MailNews:Logging#Thunderbird_Logging|Thunderbird logging]], for calendar, chat, gloda indexing and seach, ldap, nntp (news), pop, and smtp (sending mail) | * [[MailNews:Logging#Thunderbird_Logging|Thunderbird logging]], for calendar, chat, gloda indexing and seach, ldap, nntp (news), pop, and smtp (sending mail) | ||
* [[MailNews:Logging#gecko_logging|Gecko logging]], which uses [[MailNews:Logging#Thunderbird_Module_Names|module names]], such as | * [[MailNews:Logging#gecko_logging|Gecko logging]], which uses case senstive [[MailNews:Logging#Thunderbird_Module_Names|module names]], such as IMAP and IMAPAutoSync | ||
== Thunderbird Logging == | == Thunderbird Logging == | ||
Line 139: | Line 139: | ||
* Optional special strings (switches) to configure the logging behaviour. Some configuration switches take an integer parameter, in which case the integer is separated from the string by a colon (:). Most switches only apply in a specific output context. Full documentation at [https://firefox-source-docs.mozilla.org/xpcom/logging.html#the-moz-log-syntax]. | * Optional special strings (switches) to configure the logging behaviour. Some configuration switches take an integer parameter, in which case the integer is separated from the string by a colon (:). Most switches only apply in a specific output context. Full documentation at [https://firefox-source-docs.mozilla.org/xpcom/logging.html#the-moz-log-syntax]. | ||
Example module and loglevel: '''IMAPAutoSync:5,timestamp''' | Example module and loglevel: '''IMAP:4,IMAPAutoSync:5,timestamp''' | ||
''',timestamp''' adds a timestamp to all log lines - generally recommended, and required for all timeouts and issues which need to be correlated to an action at a given time of day | ''',timestamp''' adds a timestamp to all log lines - generally recommended, and required for all timeouts and issues which need to be correlated to an action at a given time of day | ||
Line 149: | Line 149: | ||
The number in MOZ_LOG specifies the level of logging to be used. A lower number reduces the amount of information being logged. Use "5" unless requested otherwise. | The number in MOZ_LOG specifies the level of logging to be used. A lower number reduces the amount of information being logged. Use "5" unless requested otherwise. | ||
* 0 = Disabled /* Indicates logging is disabled. | * 0 = Disabled /* Indicates logging is disabled. Progammers should not use this directly in code. */ | ||
* 1 = Error /* An error occurred | * 1 = Error /* An error occurred. Also generally something a programmer would consider asserting in a debug build. */ | ||
* 2 = Warning /* A warning often indicates an unexpected state. */ | * 2 = Warning /* A warning often indicates an unexpected state. */ | ||
* 3 = Info /* An informational message, often indicates the current program state. */ | * 3 = Info /* An informational message, which often indicates the current program state. */ | ||
* 4 = Debug /* A debug message, useful for debugging but too verbose to be turned on normally. */ | * 4 = Debug /* A debug message, which is useful for debugging but too verbose to be turned on normally. */ | ||
* 5 = Verbose /* A message that will be printed a lot, useful for debugging program flow and will probably impact performance. */ | * 5 = Verbose /* A message that will be printed a lot, useful for debugging program flow and will probably impact performance. */ '''Verbose is not recommended for IMAP.''' | ||
<small>Some modules may not work exactly according to the log levels noted above. Very few modules actually have more than one logging level.</small> | <small>Some modules may not work exactly according to the log levels noted above. Very few modules actually have more than one logging level.</small> | ||
Line 166: | Line 166: | ||
==== Windows ==== | ==== Windows ==== | ||
Create a batch file by copying the lines below and paste them into the notepad application, and save the file as " | Create a batch file by copying the lines below and paste them into the notepad application, and save the file as "create_log.bat". Variables MOZ_LOG and MOZ_LOG_file must not contain quotation marks. | ||
set MOZ_LOG=moduleName:5,timestamp | set MOZ_LOG=moduleName:5,timestamp | ||
Line 183: | Line 183: | ||
==== Mac OS X ==== | ==== Mac OS X ==== | ||
To generate an | To generate an log, create a text file that contains the desired commands in a text editor such as BBEdit: | ||
#!/bin/sh | #!/bin/sh | ||
Line 190: | Line 190: | ||
/Applications/Thunderbird.app/Contents/MacOS/thunderbird-bin & | /Applications/Thunderbird.app/Contents/MacOS/thunderbird-bin & | ||
If on 10.5 change the last line to arch -arch i386 /Applications/Thunderbird.app/Contents/MacOS/thunderbird-bin & | If on MacOS 10.5, change the last line to arch -arch i386 /Applications/Thunderbird.app/Contents/MacOS/thunderbird-bin & | ||
Save this file with a filename ending in .command, add execute permission by typing "<tt>chmod a+x ''filename''</tt>" in a Terminal window, then double-click it. | Save this file with a filename ending in .command, add execute permission by typing "<tt>chmod a+x ''filename''</tt>" in a Terminal window, then double-click it. | ||
Line 210: | Line 210: | ||
==== Linux/unix ==== | ==== Linux/unix ==== | ||
To generate | To generate a log, run the following commands before running the application from the command line: | ||
# For bash shell (the default shell on most GNU/Linux systems): | # For bash shell (the default shell on most GNU/Linux systems): |