Debug.log: Difference between revisions

155 bytes added ,  19 August 2021
m
add category
m (CORRECTED - now right for Cumulus 1 again, and also now usable for people using MX 3.9.3 and below)
m (add category)
 
(26 intermediate revisions by the same user not shown)
The debug logging feature is extremely useful in troubleshooting problems with Cumulus and/or connectivity to your weather station or FTP upload communications.
=Introduction=
[[Category:Log FilesDiagnostics]]
[[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 debug logging feature is extremely useful in troubleshooting problems with Cumulus and/or connectivity to your weather station or FTP upload communications.
 
If debugging is switched on, extensive messages of the format shown are added to the file and it will rapidly grow in size.
The file contains a wealth of data including the raw data received from your weather station, connectivity attempts, file uploads, etc.
 
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 .
The file can grow very large very quickly so turn the Debug Log option off it not required. If the file grows too large it can cause Cumulus (up to version 3.8.1 - b3091) to crash. (From Release 3.8.2 - b3092 adds MXdiags log rotation to avoid this).
 
==Turning debugging log on/off==
 
==File Location, Name and Format==
*By default, logging of debugging information is disabled.
*Restarting Cumulus (1, 2, or MX) will normally (you can manually change this) turn debug log off (because it is automatically turned off as Cumulus exits)
*Logging of debugging information can be enabled as Cumulus is started (see instructions below for your flavour)
*[[File:Badge vMx.png]] In MX only, you can turn the logging of debugging information on and off while it is running, using the admin interface (see below to identify which settings screen)
 
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.
The#*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 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 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'''.
#** '''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.
#*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.
 
{{Version badge 1}}Cumulus 1.x.y: The only way to turn on the logging of debugging messages in Cumulus 1, is to stop Cumulus 1, edit the [[Cumulus.ini#Section:_Station|Cumulus.ini configuration file]], and add a line in the [Station] section: <tt>Logging = 1</tt>, then restart Cumulus 1.
 
==Sample File for Cumulus 1==
[[File:Badge vMx.png]]Cumulus MX: There are three ways to '''turn on the logging''' of debugging messages in Cumulus MX:
# Close Cumulus MX, then edit [[Cumulus.ini#Read-Write_parameters_in_the_Station_section|Cumulus.ini configuration file]], and add a line in the [Station] section: <tt>Logging = 1</tt>, then restart Cumulus MX.
# When you start Cumulus MX, use [[Cumulus_MX#Parameter_for_adding_debugging|Parameter for adding debugging]] as part of the command for starting
# Use the [[MX_Administrative_Interface#Changing_Settings|admin interface Settings menu]], next ''tick'' the 'Debug Logging' menu option, and finally click '''Save''', on the appropriate web page depending on which version of MX you are using (see below). You can untick the option to disable the logging of debugging information
#* '''Program settings''' web page for version 3.9.4 - build 3099 onwards
#* [[MX_Administrative_Interface#Station_Settings|'''Station settings''']] web page for earlier MX versions
 
An extract from a '''debug.log''' file
=Details=
 
==File Location, Name and Format==
 
In Cumulus 1, the file is called Debug.log, and is located in the root of the Cumulus folder.
 
In CumulusMX, debug logging adds additional detail into the standard logging file. This is located in folder MXdiags within the CumulusMX root directory. It is a text (*.txt) file named by the date and time that the CumulusMX session began, for example: 20210112-171450.txt
 
The log file is a simple text file containing the time and a description of each event.
 
The file can be deleted at any time as Cumulus does not read from it.
 
==Sample File for Cumulus 1==
 
An extract from a '''debug.log''' file
 
9168.735 : 14:23:54 Realtime FTP Put attempt
9175.328 : TD = 0.0833333358168602 Lastval = 618 Firstval = 618 rate = 0
 
==Turning debugging loglogging on/off==
 
*By default, logging of debugging information is disabled.
*Restarting Cumulus (1, 2, or MX) will normallymean (you can manually change this) turnthe debug log is off (because it is automatically turned off as Cumulus exits)
*Logging of debugging information can be enabled as Cumulus is started, (seeor instructionsat belowsome forpoint while it is running (except yourearliest flavourbuilds)
 
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:
[[Category:Log Files]]
{{Version badge 1}}Cumulus 1.x.y: * 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.iniini_(Cumulus_1)#Section:_Station|Cumulus.ini 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