Skip to content

Commit 04bf443

Browse files
committed
SEBSP-224 better loging
1 parent 3cf6901 commit 04bf443

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

  • src/main/java/ch/ethz/seb/sps/server/datalayer/dao/impl

src/main/java/ch/ethz/seb/sps/server/datalayer/dao/impl/S3DAO.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
public class S3DAO {
4545

4646
private static final Logger log = LoggerFactory.getLogger(S3DAO.class);
47+
public static final Logger INIT_LOGGER = LoggerFactory.getLogger("SERVICE_INIT");
4748

4849
private final Environment environment;
4950

@@ -149,14 +150,14 @@ private void createBucket() throws Exception {
149150
private void printAllBucketsInService(){
150151
try{
151152
List<Bucket> bucketList = this.minioClient.listBuckets();
152-
log.info("**************S3 Buckets**************");
153+
INIT_LOGGER.info("**************S3 Buckets**************");
153154
for (Bucket bucket : bucketList) {
154-
log.info("Bucket: " + bucket.creationDate() + ", " + bucket.name());
155+
INIT_LOGGER.info("Bucket: " + bucket.creationDate() + ", " + bucket.name());
155156
}
156-
log.info("**************************************");
157+
INIT_LOGGER.info("**************************************");
157158

158159
}catch(Exception e){
159-
log.error("Error printing buckets in S3 service {}", e.getMessage());
160+
INIT_LOGGER.error(" ---> Error printing buckets in S3 service {}", e.getMessage());
160161
}
161162

162163
}

0 commit comments

Comments
 (0)