Susmit Sarkar created SSHD-1121:
-----------------------------------
Summary: Logging with Mina SSHD
Key: SSHD-1121
URL: https://issues.apache.org/jira/browse/SSHD-1121
Project: MINA SSHD
Issue Type: Bug
Reporter: Susmit Sarkar
Need to have control over the default logging for customer issues debugging.
Currently using the below parameters in log4j.properties
# The logging properties used during tests..
log4j.logger.org.apache.sshd=DEBUG
log4j.logger.org.apache.sshd.common.channel.Window=DEBUG
log4j.rootLogger=DEBUG,logfile
# File appender
log4j.appender.logfile=org.apache.log4j.RollingFileAppender
log4j.appender.logfile.layout=org.apache.log4j.PatternLayout
log4j.appender.logfile.layout.ConversionPattern=%d\{dd MMM yyyy HH:mm:ss,SSS}
[%t] %-5p %c\{1} %x - %m%n
log4j.appender.logfile.File=&LOG_DIR;/sshdnativelogs.log
log4j.appender.logfile.Append=true
log4j.appender.logfile.MaxFileSize=1MB
log4j.appender.logfile.MaxBackupIndex=10
But here the problem is nothing is getting written to the log file. But when I
run the application, in the console I am getting lots of logs, the same I need
to get it print to a log file, but with the above properties it is not working
3671672 2021-01-21 20:00:42,951 [sshd-SftpSubsystem-thread-1] DEBUG
org.apache.sshd.server.subsystem.sftp.SftpSubsystem -
resolveMissingFileAttributes(ServerSessionImpl[admin@/0:0:0:0:0:0:0:1:59365])[/[permissions]]
replace null with [OWNER_READ, OWNER_WRITE, GROUP_READ, GROUP_WRITE,
OTHERS_READ, OTHERS_WRITE]
3671672 2021-01-21 20:00:42,951 [sshd-SftpSubsystem-thread-1] DEBUG
org.apache.sshd.server.session.ServerSessionImpl -
encode(ServerSessionImpl[admin@/0:0:0:0:0:0:0:1:59365]) packet #11 sending
command=94[SSH_MSG_CHANNEL_DATA] len=261
3671751 2021-01-21 20:00:43,030 [NioProcessor-8] DEBUG
org.apache.sshd.server.channel.ChannelSession - handleData(ChannelSession[id=0,
recipient=256]-ServerSessionImpl[admin@/0:0:0:0:0:0:0:1:59365])
SSH_MSG_CHANNEL_DATA len=14
How will I have full control of enabling and disabling the logs as well apart
from writing to a log file?
Any suggestions will be be highly helpful
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]