MailNews:Logging: Difference between revisions

Jump to navigation Jump to search
m
nits
m (→‎Thunderbird Module Names: underline case senstive)
m (nits)
Line 8: Line 8:


Thunderbird has two types of logging:
Thunderbird has two types of logging:
* [[MailNews:Logging#Thunderbird_Logging|Thunderbird Logging]] for '''calendar, chat, gloda indexing and search, ldap, nntp (news), pop, and smtp (sending mail)'''. These are enabled in Thunderbird's config editor, and most log to Thunderbird's Error Console.
* [[MailNews:Logging#Thunderbird_Logging|Thunderbird Logging]] for '''calendar, chat, gloda indexing and search, ldap, nntp (news), pop, and smtp (sending mail)'''. These are enabled in Thunderbird's config editor. Most output their data to Thunderbird's Error Console.
* [[MailNews:Logging#Gecko_Logging|Gecko Logging]] which uses case sensitive [[MailNews:Logging#Thunderbird_Module_Names|module names]], such as IMAP and IMAPAutoSync. This type of logging is started from this operating system's command line, and logs to a file.
* [[MailNews:Logging#Gecko_Logging|Gecko Logging]] which uses case sensitive [[MailNews:Logging#Thunderbird_Module_Names|module names]], such as IMAP and IMAPAutoSync. This type of logging is started from this operating system's command line, and logs to a file.


Line 15: Line 15:
Thunderbird Logging is specified by [[MailNews:Logging#Setting_a_Preference|setting a preference using Thunderbird's config editor]].  
Thunderbird Logging is specified by [[MailNews:Logging#Setting_a_Preference|setting a preference using Thunderbird's config editor]].  


Log output goes to the Error Console at Tools > Developer > Error Console or use the hotkey Control+Shift+J (Command+Shift+J on macOS). Right click in the Error Console to copy individual lines, all lines, or save to a file.
Log output goes to the Error Console at Tools > Developer > Error Console or use the hotkey Control+Shift+J (Command+Shift+J on macOS). Time stamps might be useful - if you don't see them, right click the gear and "Enable Timestamps". Right click in the Error Console to copy individual lines, all lines, or save to a file.


=== Thunderbird Logging Types ===
=== Thunderbird Logging Types ===


You will need to [[MailNews:Logging#Set_a_Preference|set a preference]], of type string to a value which is '''Case Sensitive''', or type boolean.   
You will need to [[MailNews:Logging#Set_a_Preference|set a preference]], of type string to a value which is '''<u>Case Sensitive</u>''', or type boolean.   


A string example is <code>All</code>. <code>ALL</code> in all caps is not a valid string and will result in no output.
A string example is <code>All</code>. <code>ALL</code> in all caps is not a valid string and will result in no output.
Line 43: Line 43:
You must create a hidden Thunderbird preference in the Config Editor. In Thunderbird :
You must create a hidden Thunderbird preference in the Config Editor. In Thunderbird :
# do Settings > General  
# do Settings > General  
# in the search field paste <code>config editor</code>
# in the search field paste <code>config editor</code>, then click <code>Config Editor</code>  
# in the search results click <code>Config Editor</code>  
# in the search field of the Config Editor paste the full logging name, for example <code>mailnews.pop3.loglevel</code>
# in the search field paste the logging name, for example <code>mailnews.pop3.loglevel</code>
# if you see choices of "Boolean   Number   String" with a plus button to the right, then you must add the preference:
# if you are presented with choices of Boolean, Number, String with a plus sign
## click the <code>+</code> (plus sign) to add the preference, then set logging "type" according to the list above ...
## choose Boolean for true or false logging '''type''', otherwise choose String
## choose Boolean for true or false logging '''type''', otherwise choose String
## click the <code>+</code> (plus sign) to add the preference
# change the preference's value  
# change the preferences' value to the desired logging '''value'''
#* for string preferences click the pencil icon, change the value, then click the check mark
#* for string preferences click the pencil icon, change the value, then click the check mark
#* for boolean preferences click the double headed arror to switch between <code>true</code> and <code>false</code>
#* for boolean preferences click the double headed arror to switch between <code>true</code> and <code>false</code>
Line 226: Line 225:


If your log file is empty or missing, check for these common problems and review this document again:
If your log file is empty or missing, check for these common problems and review this document again:
* '''pop3, ldap, nntp, and smtp log types you must use case sensitive, modern [[MailNews:Logging#Thunderbird_Logging|Thunderbird logging]]'''
* ([[MailNews:Logging#Thunderbird_Logging|Thunderbird logging, i.e. "modern",]] '''types''' (pop3, ldap, nntp, and smtp) are '''case sensitive'''
* imap logging '''must''' be done with [[MailNews:Logging#Gecko_Logging|Gecko module logging]] using environment variables.
* imap logging '''must''' be done with [[MailNews:Logging#Gecko_Logging|Gecko module logging]] using environment variables.
* Gecko logging only:
* Gecko logging only:
** If linux, variables MOZ_LOG and MOZ_LOG_file must be in quotation marks.
** If linux, MOZ_LOG_file must be fully specified without shortcuts, such as "~/"
** Do you have write access to the directory specified in MOZ_LOG_FILE?
** Do you have write access to the directory specified in MOZ_LOG_FILE?
** Did you shut down the application?  (the log file is buffered in memory until the application is closed)
** Did you shut down the application?  (data is buffered in memory until the application and log file is closed)
** Did you restart your mailnews application, and wipe out the log of the session you wanted to debug?  (every restart wipes out the previous log)
** Did you restart Thunderbird? This will wipe out the log of the session you wanted to debug, because every restart wipes the previous log.
** If you used a batch file on Windows, is the batch file set to run with administrator privileges?
** If you used a Windows batch file, is the batch file set/allowed to run with administrator privileges?
** Do your log variables contain quotation marks or other invalid characters?
** Do your log variables contain quotation marks or other invalid characters?
** Are your log module names correctly '''CASE SENSITIVE'''?  (meaning mixed case, or camel case which is not all upper case, nor all lower case)
** Are your log module names correctly '''CASE SENSITIVE'''?  (meaning mixed case, or camel case which is not all upper case, nor all lower case)
** If linux:
*** variables MOZ_LOG and MOZ_LOG_file must be in quotation marks.
*** variable MOZ_LOG_file must be full directory path, specified without shortcuts such as "~/"


== NSPR Logging Options ==
== NSPR Logging Options ==


NSPR also has logging. Miscellaneous [http://www.mozilla.org/projects/nspr/reference/html/prlog.html NSPR Reference (logging)].
NSPR also has logging. See [http://www.mozilla.org/projects/nspr/reference/html/prlog.html NSPR Reference (logging)].


== Enhancement Ideas ==  
== Enhancement Ideas ==  
canmove, Confirmed users
2,237

edits

Navigation menu