Skip to content

Logfiles

CareSuite stores all log files in the /opt/caresuite/log folder. The current day's log file is stored in plain text. Older log files are moved to the archive folder and compressed using gzip.

Log level

By default, only info, warning and error messages are logged (log level info).

To log more infomration, open the /opt/caresuite/data/caresuite.toml file in a text editor and change the level option under the [log] section to either debug (logs most things) or trace (logs everything).

ini
[log]
level = "debug"

Save the file and run cs.restart in a terminal to reload the config. Note that this will lead to a few seconds of downtime of the CareSuite web interface.

It is advised to change the log level back to info once the detailed log entries are no longer required.

Available log files

caresuite.log

The caresuite.log contains all log entries from the main CareSuite server process. This includes background jobs (hub sync, reports, health checks), database queries and the processing of incoming TCP log messages (calls).

manager.log

The manager.log contains the log entries of the CareSuite Manager service that runs in the background. The Manager service is responsible for updating the CareSuite automatically.

tcp.log

The tcp.log file contains the unmodified original TCP messages sent from the Gets TCP Module.

Reading log files

The easiest method to read a log file is to open it in a graphical text editor (like Sublime Text).

There are also options to read the log file from the terminal:

bash
# Read the log file from the top, use the space key
# to show the next page, press "q" to quit.
more caresuite.log
# Show the last lines of the caresuite.log
tail caresuite.log
# Show the last 100 lines of the caresuite.log
# Use "more" to paginate the output
tail -n 100 caresuite.log | more
# Show the last lines and keep loading new lines 
# once available, press "Ctrl + c" to quit.
tail -f caresuite.log

Reading compressed files

To read a .gz compressed log file, double click it in the file manager or select Extract here in the context menu. This will give you the original uncompressed log file.

A .gz file can also be read on the terminal by using zcat and combining it with other commands:

bash
# Extract a compressed log file and show the last few lines
zcat caresuite.log.gz | tail 
# Extract a compressed log file and show it page-by-page
zcat caresuite.log.gz | more