mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-11-29 22:08:10 +02:00
This change will fix file editing from sshfs, we need this patch https://github.com/pkg/sftp/pull/373 for pkg/sftp to support this feature
2.9 KiB
2.9 KiB
Logs
The log file is a stream of JSON structs. Each struct has a sender field that identifies the log type.
The logs can be divided into the following categories:
- "app logs", internal logs used to debug SFTPGo:
senderstring. This is generally the package name that emits the logtimestring. Date/time with millisecond precisionlevelstringmessagestring
- "transfer logs", SFTP/SCP transfer logs:
senderstring.UploadorDownloadtimestring. Date/time with millisecond precisionlevelstringelapsed_ms, int64. Elapsed time, as milliseconds, for the upload/downloadsize_bytes, int64. Size, as bytes, of the download/uploadusername, stringfile_pathstringconnection_idstring. Unique connection identifierprotocolstring.SFTPorSCP
- "command logs", SFTP/SCP command logs:
senderstring.Rename,Rmdir,Mkdir,Symlink,Remove,Chmod,Chown,Chtimes,Truncate,SSHCommandlevelstringusername, stringfile_pathstringtarget_pathstringfilemodestring. Valid for senderChmodotherwise emptyuidinteger. Valid for senderChownotherwise -1gidinteger. Valid for senderChownotherwise -1access_timedatetime as YYYY-MM-DDTHH:MM:SS. Valid for senderChtimesotherwise emptymodification_timedatetime as YYYY-MM-DDTHH:MM:SS. Valid for senderChtimesotherwise emptysizeint64. Valid for senderTruncateotherwise -1ssh_command, string. Valid for senderSSHCommandotherwise emptyconnection_idstring. Unique connection identifierprotocolstring.SFTP,SCPorSSH
- "http logs", REST API logs:
senderstring.httpdlevelstringremote_addrstring. IP and port of the remote clientprotostring, for exampleHTTP/1.1methodstring. HTTP method (GET,POST,PUT,DELETEetc.)user_agentstringuristring. Full uriresp_statusinteger. HTTP response status coderesp_sizeinteger. Size in bytes of the HTTP responseelapsed_msint64. Elapsed time, as milliseconds, to complete the requestrequest_idstring. Unique request identifier
- "connection failed logs", logs for failed attempts to initialize a connection. A connection can fail for an authentication error or other errors such as a client abort or a timeout if the login does not happen in two minutes
senderstring.connection_failedlevelstringusername, string. Can be empty if the connection is closed before an authentication attemptclient_ipstring.protocolstring. Possible values areSSH,FTP,DAVlogin_typestring. Can bepublickey,password,keyboard-interactive,publickey+password,publickey+keyboard-interactiveorno_auth_tryederrorstring. Optional error description