Debug.log: Difference between revisions

From Cumulus Wiki
Jump to navigationJump to search
741 bytes removed ,  14:13, 19 August 2021
m
add category
m (add category)
 
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
=Introduction=
The debug logging feature is extremely useful in troubleshooting problems with Cumulus.
[[Category:Diagnostics]]
[[Category:Cumulus 1]] [[File:Badge v1.png]] This page only applies to Cumulus 1.
[[Category:Cumulus Files]]
== File growth and deletion ==
 
If debugging is switched off, periodically a message, confirming that as shown earlier, is added to the '''debug.log''' file, so it grows in size even when full diagnostics are not being stored.


The introduction to [[Diagnostics|Diagnostics article]] is the place to look for general information about the files described here for Cumulus 1.
If debugging is switched on, extensive messages of the format shown are added to the file and it will rapidly grow in size.  


This article is only for Cumulus 1 users, please see [[MXDiags]]  for equivalent file if you use Cumulus MX.
To avoid loss (or inaccuracy) of readings being processed from your weather station, it is best if Cumulus is left running, and not restarted except when unavoidable. Consequently, the '''debug.log''' file will continually grow in size. If the file is left to grow too large, Cumulus will crash. Therefore, you '''should''' delete this file periodically .  


=Details=


== File names ==
=File Location, Name and Format=


Cumulus 1 creates diagnostic logs in two places:
Cumulus 1 creates diagnostic logs in two places:
# It creates a file called '''Debug.log''' in the same folder as where the executable is stored.
# It creates a file called '''Debug.log''' in the same folder as where the executable is stored.
#*This file can be deleted at any time as Cumulus does not read from it, and creates a new file when needed
#*The log file is a simple text file containing the time and a description of each event.
#* This file periodically has a message '''0000.000 : **** Logging Disabled''' stored if debugging is switched off.
#* This file periodically has a message '''0000.000 : **** Logging Disabled''' stored if debugging is switched off.
#* This file will have additional debugging information added, as per example below, if debugging is turned on.
#* This file will have additional debugging information added, as per example below, if debugging is turned on.
# It creates a [[Diags_folder|diags folder]]; '''diags''' is a subfolder of the folder where the Cumulus executable is stored.
# It creates a [[Diags_folder|diags folder]]; '''diags''' is a sub-folder of the folder where the Cumulus executable is stored.
#* That diags folder contains up to 10 files named '''cumulus.~og''' and '''cumulus.001''' to '''cumulus.009'''.   
#* That diags folder contains up to 10 files named '''cumulus.~og''' and '''cumulus.001''' to '''cumulus.009'''.   
#** '''cumulus.~og''' is the current log reporting what has happened since the last time Cumulus was started.
#** '''cumulus.~og''' is the current log reporting what has happened since the last time Cumulus was started.
#** '''cumulus.001''' to '''cumulus.009''' represent logs for previous 9 Cumulus restarts, and so do not exist if Cumulus has not been used before.
#** '''cumulus.001''' to '''cumulus.009''' represent logs for previous 9 Cumulus restarts, and so do not exist if Cumulus has not been used before.
#* Each file in the diags folder has entries like the example below, regardless of whether debugging is turned on or off.
#*Further information about this is to be found on the [[Diags_folder|diags folder]] page.
 
#* Any diagnostic file can be deleted, at any time, as Cumulus does not read from them. Cumulus creates a new file if necessary to continue its logging.
Further information about the second place is to be found on the [[Diags_folder|diags folder]] page.
 
==File type,  and content==
 
All diagnostic log files are simple text files, with multiple lines (inside a file) containing the time and a description of each event.
 
Entries in '''debug.log''' are identified by date as fraction, and time e.g. ''9173.516 : 14:23:59''.
 
== File growth and deletion ==
 
A new file is created each time Cumulus is restarted, after deleting the oldest and renaming the other old files to maintain the naming sequence. If debugging is switched off, periodically a message, confirming that as shown earlier, is added to the '''debug.log''' file, so it grows in size even when full diagnostics are not being stored.
 
Entries are added to the '''cumulus.~og''' file while Cumulus is left running, regardless of whether debugging is on or off (see example above). 
 
To avoid loss (or inaccuracy) of readings being processed from your weather station, it is best if Cumulus is left running, and not restarted except when unavoidable. Consequently, the current diagnostic files will grow in size. If the file is left to grow too large, Cumulus will crash. Therefore, you may want to delete these files.
 
Any diagnostic file can be deleted at any time as Cumulus does not read from them. Cumulus creates a new file if necessary to continue its logging.
 
== Solving Cumulus 1 Errors ==
 
The diagnostic file '''cumulus.~og''' also logs error messages, often with extra information compared to the error window (accessed by clicking ''error'' light/indicator), and that file may help you if you have a problem.
 
When you ask for support via the forum, you often need to upload (as a zip) one, or all, of the diagnostic files in the '''Diags''' folder especially for problems that occur when you start or restart Cumulus.  Include all files in the folder, unless you definitely know that a single diags file contains all the information for ''both when'' Cumulus 1 is running normally, ''and when'' it encountered the problem and failed.
 
In Windows Explorer, open the Cumulus installation folder (default is C:\Cumulus). Right-click on the 'Diags' folder, and from the pop-up menu, select 'Send to -> Compressed (zipped) Folder' (available in most Windows versions). This will create a file called Diags.zip.  Add '''debug.log''' from the folder above into the zip.


Post your message in the forum, and attach the zip file using the 'Attachment' section below the area where you have typed your message (browse for the file, then click 'Add the file').


==Sample File for Cumulus 1==
=Sample File=


An extract from a '''debug.log''' file
An extract from a debug.log file


  9168.735 : 14:23:54 Realtime FTP Put attempt
  9168.735 : 14:23:54 Realtime FTP Put attempt
Line 71: Line 52:
  9175.328 : TD = 0.0833333358168602 Lastval = 618 Firstval = 618 rate = 0
  9175.328 : TD = 0.0833333358168602 Lastval = 618 Firstval = 618 rate = 0


=Turning debugging logging on/off=


*By default, logging of debugging information is disabled.
*Restarting Cumulus will mean the debug log is off (because it is automatically turned off as Cumulus exits)
*Logging of debugging information can be enabled as Cumulus is started, or at some point while it is running (except earliest builds)


[[Category:Log Files]]
Depending on which version of Cumulus 1 you are using, there is '''either one or two ways''' of turning logging of debugging data on and off:
* The only way to turn on the logging of debugging messages in all builds of Cumulus 1, is to stop Cumulus 1, edit the [[Cumulus.ini_(Cumulus_1)#Section:_Station|configuration file]], and add a line in the [Station] section: <tt>Logging = 1</tt>, then restart Cumulus 1.
* From build 1003 onward, you can also turn it on/off using the '''Configuration''' menu (debug option is included in drop down of that menu).
5,838

edits

Navigation menu