2019-02-26 14:23:03 +01:00
|
|
|
# Debugging MEGAcmd
|
|
|
|
|
|
|
|
There are two different kinds of logging messages:
|
|
|
|
- MEGAcmd based: those messages reported by MEGAcmd itself.
|
|
|
|
|
|
|
|
These messages will show information regarding the processing of user commands.
|
|
|
|
|
|
|
|
- SDK based: those messages reported by the sdk and dependent libraries.
|
|
|
|
|
2024-06-19 14:09:51 +02:00
|
|
|
These messages will show information regarding requests, transfers, network, etc.
|
|
|
|
They will be labeled with `SDK:`.
|
2019-02-26 14:23:03 +01:00
|
|
|
|
|
|
|
MEGAcmdServer logs messages depending on the level of log adjusted to those
|
|
|
|
two categories. You can adjust the level of logging for those kinds with `log` command.
|
|
|
|
Log levels range from FATAL (the lowest) to VERBOSE (the highest).
|
|
|
|
|
|
|
|
## How to access the logs
|
|
|
|
|
2024-06-19 14:09:51 +02:00
|
|
|
Accessing the logs depends on the platform you are in.
|
2019-02-26 14:23:03 +01:00
|
|
|
|
|
|
|
### MacOS
|
|
|
|
|
2024-06-19 14:09:51 +02:00
|
|
|
By default, whenever MEGAcmdServer is executed, it will log the output into
|
|
|
|
`$HOME/.megaCmd/megacmdserver.log`.
|
2019-02-26 14:23:03 +01:00
|
|
|
|
|
|
|
If you want to launch it manually execute in a terminal:
|
|
|
|
|
|
|
|
```
|
|
|
|
export PATH=/Applications/MEGAcmd.app/Contents/MacOS:$PATH
|
|
|
|
./mega-cmd
|
|
|
|
```
|
|
|
|
|
|
|
|
### Linux
|
2024-06-19 14:09:51 +02:00
|
|
|
By default, whenever MEGAcmdServer is executed, it will log the output into
|
|
|
|
$HOME/.megaCmd/megacmdserver.log.
|
2019-02-26 14:23:03 +01:00
|
|
|
|
|
|
|
If you want to launch it manually execute in a terminal:
|
|
|
|
|
|
|
|
```
|
|
|
|
mega-cmd-server
|
|
|
|
```
|
|
|
|
|
|
|
|
### Windows
|
|
|
|
|
2024-06-19 14:09:51 +02:00
|
|
|
MEGAcmdServer is executed in the background without saving the log into a file. If you want to
|
2019-04-25 13:31:11 +02:00
|
|
|
see the output you would need to execute the server (MEGAcmdServer.exe) manually.
|
2019-02-26 14:23:03 +01:00
|
|
|
|
|
|
|
## Verbosity on startup
|
|
|
|
|
|
|
|
You can start the server with higher level of verbosity in order to have log levels increased at startup.
|
2019-04-25 13:31:11 +02:00
|
|
|
In Windows & Linux you will need to pass `--debug-full` as an argument to the executable (e.g: `MEGAcmdServer.exe --debug-full`).
|
2019-02-26 14:23:03 +01:00
|
|
|
|
|
|
|
In MacOS, you can use `MEGACMD_LOGLEVEL` environment variable like this: `MEGACMD_LOGLEVEL=FULLDEBUG ./mega-cmd`.
|
|
|
|
|
|
|
|
If you want other startup level of loggin, you can use:
|
|
|
|
|
|
|
|
* `--debug`
|
|
|
|
* `MEGACMD_LOGLEVEL=DEBUG`
|
|
|
|
|
|
|
|
This will set:
|
|
|
|
|
|
|
|
MEGAcmd log level = DEBUG
|
|
|
|
SDK log level = DEFAULT
|
|
|
|
|
|
|
|
* `--debug-full`
|
|
|
|
* `MEGACMD_LOGLEVEL=DEBUG`
|
|
|
|
|
|
|
|
This will set:
|
|
|
|
|
|
|
|
MEGAcmd log level = DEBUG
|
|
|
|
SDK log level = DEBUG
|
|
|
|
|
|
|
|
* `--verbose`
|
|
|
|
* `MEGACMD_LOGLEVEL=VERBOSE`
|
|
|
|
|
|
|
|
This will set:
|
|
|
|
|
|
|
|
MEGAcmd log level = VERBOSE
|
|
|
|
SDK log level = DEFAULT
|
|
|
|
|
|
|
|
* `--verbose-full`
|
|
|
|
* `MEGACMD_LOGLEVEL=FULLVERBOSE`
|
|
|
|
|
|
|
|
This will set:
|
|
|
|
|
|
|
|
MEGAcmd log level = VERBOSE
|
|
|
|
SDK log level = VERBOSE
|
|
|
|
|
|
|
|
|
|
|
|
## Controlling verbosity of a single command
|
|
|
|
|
2024-06-19 14:09:51 +02:00
|
|
|
You can pass `-v` (`-vv`, `-vvv`, and so on for a more verbose output)
|
2019-02-26 14:23:03 +01:00
|
|
|
to an specific command and it will use higher level of verbosity of MEGAcmd based messages.
|
|
|
|
|