Show Server Logs
Retrieves logs of the server which can be useful for debugging and monitoring.
Usage
odin fleet servers logs [--server-id=SERVER_ID] [--details=DETAILS] [--follow=FOLLOW] [--stdout=STDOUT]
[--stderr=STDERR] [--since=SINCE] [--timestamps] [--tail=TAIL]
This command does not support the --format flag. Output is always in text format.
Examples
Retrieve details for an image by ID as a JSON object:
Show logs of the last hour with timestamps and only error messages:
Flags
--server-id=<number>:
The ID of the image to retrieve details for. If omitted, the CLI will prompt you to enter the image ID interactively.--details:
Show detailed logs iftrue, otherwise show only the log message.--follow:
Follow logs iftrue.--stdout:
Show stdout logs. Default istrue.--stderr:
Show stderr logs. Default istrue.--since=<string>:
Only return logs newer than a relative duration like 30, 180. Default is all logs.--timestamps:
Show timestamps--tail=<string>:
Number of lines to show from the end of the logs. Useallto show all logs.
Global Flags
The following flags can be used with any ODIN CLI command:
-
--api-key=<string>The API key to use for authentication. If omitted, the CLI will use the api-key stored in the configuration file on your system. Use odin login to store the API key for subsequent commands. -
--app-id=<string>The ID of the app to use for the command. If omitted, the CLI will use the currently selected app. Use odin apps select to select an app interactively. -
--format=<string>The output format to use for the command. Supported formats arejson,value,flattenedandtable. If omitted, the CLI will use the default format specified in the configuration file. Learn more about output formatting. -
--forceForces the command to execute without prompting for confirmation. Use with caution. -
--quietSuppresses all informational output except for errors. Useful for scripting and automation.