|
24 | 24 | import java.util.function.Supplier;
|
25 | 25 | import java.util.regex.Pattern;
|
26 | 26 |
|
| 27 | +import org.apache.logging.log4j.LogManager; |
| 28 | +import org.apache.logging.log4j.Logger; |
27 | 29 | import org.codelibs.core.lang.StringUtil;
|
28 | 30 | import org.codelibs.fess.Constants;
|
29 | 31 | import org.codelibs.fess.app.service.FileAuthenticationService;
|
|
40 | 42 | */
|
41 | 43 | public class FileConfig extends BsFileConfig implements CrawlingConfig {
|
42 | 44 |
|
| 45 | + private static final Logger logger = LogManager.getLogger(FileConfig.class); |
| 46 | + |
43 | 47 | private static final long serialVersionUID = 1L;
|
44 | 48 |
|
45 | 49 | protected volatile Pattern[] includedDocPathPatterns;
|
@@ -167,6 +171,10 @@ public CrawlerClientFactory initializeClientFactory(final Supplier<CrawlerClient
|
167 | 171 | final List<org.codelibs.fess.crawler.client.smb1.SmbAuthentication> smb1AuthList = new ArrayList<>();
|
168 | 172 | final List<FtpAuthentication> ftpAuthList = new ArrayList<>();
|
169 | 173 | for (final FileAuthentication fileAuth : fileAuthList) {
|
| 174 | + if (logger.isDebugEnabled()) { |
| 175 | + logger.debug("FileAuthentication: " + fileAuth.getProtocolScheme() + " " + fileAuth.getHostname() + ":" + fileAuth.getPort() |
| 176 | + + " " + fileAuth.getUsername()); |
| 177 | + } |
170 | 178 | if (Constants.SAMBA.equals(fileAuth.getProtocolScheme())) {
|
171 | 179 | final SmbAuthentication smbAuth = new SmbAuthentication();
|
172 | 180 | final Map<String, String> map = ParameterUtil.parse(fileAuth.getParameters());
|
@@ -196,9 +204,21 @@ public CrawlerClientFactory initializeClientFactory(final Supplier<CrawlerClient
|
196 | 204 | }
|
197 | 205 | }
|
198 | 206 | paramMap.put(Param.Client.SMB_AUTHENTICATIONS, smbAuthList.toArray(new SmbAuthentication[smbAuthList.size()]));
|
| 207 | + if (logger.isDebugEnabled()) { |
| 208 | + smbAuthList.forEach(smbAuth -> logger |
| 209 | + .debug("SmbAuthentication: " + smbAuth.getServer() + ":" + smbAuth.getPort() + " " + smbAuth.getUsername())); |
| 210 | + } |
199 | 211 | paramMap.put(Param.Client.SMB1_AUTHENTICATIONS,
|
200 | 212 | smb1AuthList.toArray(new org.codelibs.fess.crawler.client.smb1.SmbAuthentication[smb1AuthList.size()]));
|
| 213 | + if (logger.isDebugEnabled()) { |
| 214 | + smb1AuthList.forEach(smb1Auth -> logger |
| 215 | + .debug("Smb1Authentication: " + smb1Auth.getServer() + ":" + smb1Auth.getPort() + " " + smb1Auth.getUsername())); |
| 216 | + } |
201 | 217 | paramMap.put(Param.Client.FTP_AUTHENTICATIONS, ftpAuthList.toArray(new FtpAuthentication[ftpAuthList.size()]));
|
| 218 | + if (logger.isDebugEnabled()) { |
| 219 | + ftpAuthList.forEach(ftpAuth -> logger |
| 220 | + .debug("FtpAuthentication: " + ftpAuth.getServer() + ":" + ftpAuth.getPort() + " " + ftpAuth.getUsername())); |
| 221 | + } |
202 | 222 |
|
203 | 223 | crawlerClientFactory = factory;
|
204 | 224 | return factory;
|
|
0 commit comments