mirror of
https://github.com/drakkan/sftpgo.git
synced 2024-11-22 15:40:23 +00:00
f41ce6619f
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:
sender
string. This is generally the package name that emits the logtime
string. Date/time with millisecond precisionlevel
stringmessage
string
- "transfer logs", SFTP/SCP transfer logs:
sender
string.Upload
orDownload
time
string. Date/time with millisecond precisionlevel
stringelapsed_ms
, int64. Elapsed time, as milliseconds, for the upload/downloadsize_bytes
, int64. Size, as bytes, of the download/uploadusername
, stringfile_path
stringconnection_id
string. Unique connection identifierprotocol
string.SFTP
orSCP
- "command logs", SFTP/SCP command logs:
sender
string.Rename
,Rmdir
,Mkdir
,Symlink
,Remove
,Chmod
,Chown
,Chtimes
,Truncate
,SSHCommand
level
stringusername
, stringfile_path
stringtarget_path
stringfilemode
string. Valid for senderChmod
otherwise emptyuid
integer. Valid for senderChown
otherwise -1gid
integer. Valid for senderChown
otherwise -1access_time
datetime as YYYY-MM-DDTHH:MM:SS. Valid for senderChtimes
otherwise emptymodification_time
datetime as YYYY-MM-DDTHH:MM:SS. Valid for senderChtimes
otherwise emptysize
int64. Valid for senderTruncate
otherwise -1ssh_command
, string. Valid for senderSSHCommand
otherwise emptyconnection_id
string. Unique connection identifierprotocol
string.SFTP
,SCP
orSSH
- "http logs", REST API logs:
sender
string.httpd
level
stringremote_addr
string. IP and port of the remote clientproto
string, for exampleHTTP/1.1
method
string. HTTP method (GET
,POST
,PUT
,DELETE
etc.)user_agent
stringuri
string. Full uriresp_status
integer. HTTP response status coderesp_size
integer. Size in bytes of the HTTP responseelapsed_ms
int64. Elapsed time, as milliseconds, to complete the requestrequest_id
string. 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
sender
string.connection_failed
level
stringusername
, string. Can be empty if the connection is closed before an authentication attemptclient_ip
string.protocol
string. Possible values areSSH
,FTP
,DAV
login_type
string. Can bepublickey
,password
,keyboard-interactive
,publickey+password
,publickey+keyboard-interactive
orno_auth_tryed
error
string. Optional error description