1313import gate .corpora .DocumentImpl ;
1414import gate .util .GateException ;
1515import gate .util .persistence .PersistenceManager ;
16- import org .apache . log4j . LogManager ;
17- import org .apache . log4j . Logger ;
16+ import org .slf4j . Logger ;
17+ import org .slf4j . LoggerFactory ;
1818
1919import java .io .ByteArrayOutputStream ;
2020import java .io .File ;
@@ -46,7 +46,7 @@ public class App implements RequestHandler<APIGatewayProxyRequestEvent, APIGatew
4646 "CACHE_DIR_PREFIX" , "/tmp/lru/" + GATE_APP_NAME );
4747 private static final double CACHE_DIR_USAGE = .9 ;
4848 private static final String DIGEST_SALT = UUID .randomUUID ().toString ();
49- private static final Logger logger = LogManager .getLogger (App .class );
49+ private static final Logger logger = LoggerFactory .getLogger (App .class );
5050 private static final CorpusController application = AWSXRay .createSegment (
5151 "Gate Load" , App ::loadApplication );
5252 private static final AppMetadata metadata = loadMetadata ();
@@ -148,7 +148,7 @@ public APIGatewayProxyResponseEvent handleExecute(APIGatewayProxyRequestEvent in
148148 AWSXRay .endSubsegment ();
149149 }
150150 } catch (GateException e ) {
151- logger .error (e );
151+ logger .error (e . getMessage (), e );
152152 AWSXRay .getCurrentSubsegmentOptional ().ifPresent ((segment -> segment .addException (e )));
153153 response .getHeaders ().put ("Content-Type" , "application/json" );
154154 return response .withStatusCode (400 ).withBody (Utils .asJson (
@@ -157,7 +157,7 @@ public APIGatewayProxyResponseEvent handleExecute(APIGatewayProxyRequestEvent in
157157 }}
158158 ));
159159 } catch (IOException e ) {
160- logger .error (e );
160+ logger .error (e . getMessage (), e );
161161 AWSXRay .getCurrentSubsegmentOptional ().ifPresent ((segment -> segment .addException (e )));
162162 response .getHeaders ().put ("Content-Type" , "application/json" );
163163 return response .withStatusCode (406 ).withBody (Utils .asJson (
0 commit comments