- Docs
- Client Apps
- Command Line Interface (CLI) App
- CLI App Output and Logs
CLI App Output and Logs
The CLI App provides multiple output formatting options as well as providing various log options.
Formatting the Output
By default, the CLI App will output its data in table format.
You can configure the output format by using the --format
option. For example, to specify that the output should be formatted in JSON format, use the option --format=json
.
Available output formats are:
table
table,interactive
table,dark
table,bright
table,light
table,markdown
json
json,raw
csv
The default output format is table
.
Here are some examples:
files-cli folders list-for /path/to/folder --format=csv
files-cli folders create --path="/path/to/folder/to/be/created" --format=json,raw
files-cli users list --format=table,dark
Saving Output to a File
You can save the output of the operation to a file by using the --output
flag. This is useful for saving a log of the actions taken by the operation.
files-cli upload /local/path/to/folder/ /remote/path/to/folder/ --output="log.txt"
You can also format the output by using the --output-format
flag and specifying either text
, csv
, or json
as the format type. The default format type is csv
.
files-cli upload /local/path/to/folder/ /remote/path/to/folder/ --output="log.txt "--output-format=text
Sending Operation/Run Logs to the Cloud
If you are running scripted operations, you can have the CLI send a report of the operation including the Success/Failure status as well as a log of every run. To do this add the flag --send-logs-to-cloud
.
The logs from the CLI App will be contained within the External Logs of your Files.com site.
Debug Logs
When communicating with our Support team, you may be asked to provide a debug log to assist with troubleshooting. You can use the --debug
flag to generate a debug log file.
files-cli upload /local/path/to/folder/ /remote/path/to/folder/ --debug="debuglog.txt"