Skip to content

Commit 6fd5bfd

Browse files
authored
Add logging (#618)
1 parent 78d4821 commit 6fd5bfd

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

gxmail/src/main/java/com/genexus/internet/GXPOP3Session.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11

22
package com.genexus.internet;
33

4+
import com.genexus.diagnostics.core.ILogger;
5+
import com.genexus.diagnostics.core.LogManager;
6+
47
public class GXPOP3Session implements GXInternetConstants
58
{
9+
public static final ILogger logger = LogManager.getLogger(GXPOP3Session.class);
10+
611
private IPOP3Session session;
712

813
private String host;
@@ -32,6 +37,7 @@ public GXPOP3Session()
3237
catch(Throwable e)
3338
{
3439
session = new POP3Session();
40+
logger.warn("Using POP3Session legacy implementation");
3541
}
3642

3743

gxmail/src/main/java/com/genexus/internet/GXSMTPSession.java

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11

22
package com.genexus.internet;
33

4-
public class GXSMTPSession
4+
import com.genexus.diagnostics.core.ILogger;
5+
import com.genexus.diagnostics.core.LogManager;
6+
7+
public class GXSMTPSession
58
{
9+
public static final ILogger logger = LogManager.getLogger(GXSMTPSession.class);
10+
611
private ISMTPSession session ;
712
private String host;
813
private int port;
@@ -21,13 +26,14 @@ public class GXSMTPSession
2126
public GXSMTPSession()
2227
{
2328
try
24-
{
29+
{
2530
Class c = Class.forName("jakarta.mail.Session");
2631
session = new SMTPSessionJavaMail();
2732
}
2833
catch(Throwable e)
2934
{
3035
session = new SMTPSession();
36+
logger.warn("Using SMTPSession legacy implementation");
3137
}
3238

3339
setHost("");

0 commit comments

Comments
 (0)