TS11: Add log rotation and change all trace log writes to debug
This commit is contained in:
parent
4be964b537
commit
adb28fdf9f
@ -29,7 +29,7 @@ public class HorseFileDao implements FileDao {
|
|||||||
throw new IOException("Unsupported file type");
|
throw new IOException("Unsupported file type");
|
||||||
|
|
||||||
String fileName = file.getOriginalFilename();
|
String fileName = file.getOriginalFilename();
|
||||||
LOGGER.trace("Writing file to " + FILE_BASE_PATH + fileName);
|
LOGGER.debug("Writing file to " + FILE_BASE_PATH + fileName);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// Create directory if it doesn't exist
|
// Create directory if it doesn't exist
|
||||||
@ -45,7 +45,6 @@ public class HorseFileDao implements FileDao {
|
|||||||
throw new FileSystemException("Base upload directory " + FILE_BASE_PATH + " does not exist");
|
throw new FileSystemException("Base upload directory " + FILE_BASE_PATH + " does not exist");
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
LOGGER.error(e.getMessage());
|
|
||||||
throw new IOException("Saving the file failed");
|
throw new IOException("Saving the file failed");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -55,11 +54,10 @@ public class HorseFileDao implements FileDao {
|
|||||||
if(fileName == null || fileName.equals(""))
|
if(fileName == null || fileName.equals(""))
|
||||||
throw new IOException("Cannot delete an unexisting file");
|
throw new IOException("Cannot delete an unexisting file");
|
||||||
|
|
||||||
LOGGER.trace("Deleting file from " + FILE_BASE_PATH + fileName);
|
LOGGER.debug("Deleting file from " + FILE_BASE_PATH + fileName);
|
||||||
try {
|
try {
|
||||||
new File(FILE_BASE_PATH + fileName).delete();
|
new File(FILE_BASE_PATH + fileName).delete();
|
||||||
} catch(Exception e) {
|
} catch(Exception e) {
|
||||||
LOGGER.error(e.getMessage());
|
|
||||||
throw new IOException("Deleting the file specified failed");
|
throw new IOException("Deleting the file specified failed");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -69,14 +67,13 @@ public class HorseFileDao implements FileDao {
|
|||||||
if(fileName == null || fileName.equals(""))
|
if(fileName == null || fileName.equals(""))
|
||||||
throw new IOException("Cannot open an unexisting file");
|
throw new IOException("Cannot open an unexisting file");
|
||||||
|
|
||||||
LOGGER.trace("Getting file from " + FILE_BASE_PATH + fileName);
|
LOGGER.debug("Getting file from " + FILE_BASE_PATH + fileName);
|
||||||
try {
|
try {
|
||||||
// Read the file and return a byte array
|
// Read the file and return a byte array
|
||||||
// https://stackoverflow.com/a/5083666
|
// https://stackoverflow.com/a/5083666
|
||||||
File imageFile = new File(FILE_BASE_PATH + fileName);
|
File imageFile = new File(FILE_BASE_PATH + fileName);
|
||||||
return Files.readAllBytes(imageFile.toPath());
|
return Files.readAllBytes(imageFile.toPath());
|
||||||
} catch(Exception e) {
|
} catch(Exception e) {
|
||||||
LOGGER.error(e.getMessage());
|
|
||||||
throw new IOException("Opening the file specified failed");
|
throw new IOException("Opening the file specified failed");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -44,7 +44,7 @@ public class HorseJdbcDao implements HorseDao {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Horse findOneById(Long id) {
|
public Horse findOneById(Long id) {
|
||||||
LOGGER.trace("Get horse with id {}", id);
|
LOGGER.debug("Get horse with id {}", id);
|
||||||
final String sql = "SELECT * FROM " + TABLE_NAME + " WHERE id=?";
|
final String sql = "SELECT * FROM " + TABLE_NAME + " WHERE id=?";
|
||||||
List<Horse> horses = jdbcTemplate.query(sql, new Object[] { id }, this::mapRow);
|
List<Horse> horses = jdbcTemplate.query(sql, new Object[] { id }, this::mapRow);
|
||||||
|
|
||||||
@ -56,7 +56,7 @@ public class HorseJdbcDao implements HorseDao {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<Horse> getAll() throws NotFoundException {
|
public List<Horse> getAll() throws NotFoundException {
|
||||||
LOGGER.trace("Get all horses");
|
LOGGER.debug("Get all horses");
|
||||||
final String sql = "SELECT * FROM " + TABLE_NAME;
|
final String sql = "SELECT * FROM " + TABLE_NAME;
|
||||||
List<Horse> horses = jdbcTemplate.query(sql, new Object[] { }, this::mapRow);
|
List<Horse> horses = jdbcTemplate.query(sql, new Object[] { }, this::mapRow);
|
||||||
|
|
||||||
@ -67,7 +67,7 @@ public class HorseJdbcDao implements HorseDao {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<Horse> getFiltered(Map<String, String> filters) throws NotFoundException {
|
public List<Horse> getFiltered(Map<String, String> filters) throws NotFoundException {
|
||||||
LOGGER.trace("Get all horses with filters " + filters.entrySet());
|
LOGGER.debug("Get all horses with filters " + filters.entrySet());
|
||||||
final String sql = "SELECT * FROM " + TABLE_NAME + " WHERE UPPER(name) LIKE :name AND UPPER(description) LIKE :description AND race LIKE :race AND score LIKE :score AND birthday <= :birthday";
|
final String sql = "SELECT * FROM " + TABLE_NAME + " WHERE UPPER(name) LIKE :name AND UPPER(description) LIKE :description AND race LIKE :race AND score LIKE :score AND birthday <= :birthday";
|
||||||
|
|
||||||
// Create a list to hold the results
|
// Create a list to hold the results
|
||||||
@ -112,7 +112,7 @@ public class HorseJdbcDao implements HorseDao {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Horse addHorse(Horse horse) throws DataAccessException {
|
public Horse addHorse(Horse horse) throws DataAccessException {
|
||||||
LOGGER.trace("Add horse {}", horse.toString());
|
LOGGER.debug("Add horse {}", horse.toString());
|
||||||
String sql = "INSERT INTO " + TABLE_NAME + "(name, description, score, birthday, race, image_path, owner_id, created_at, updated_at) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?)";
|
String sql = "INSERT INTO " + TABLE_NAME + "(name, description, score, birthday, race, image_path, owner_id, created_at, updated_at) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?)";
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@ -162,7 +162,7 @@ public class HorseJdbcDao implements HorseDao {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Horse updateHorse(Horse horse) throws DataAccessException, IOException {
|
public Horse updateHorse(Horse horse) throws DataAccessException, IOException {
|
||||||
LOGGER.trace("Update horse {}", horse.toString());
|
LOGGER.debug("Update horse {}", horse.toString());
|
||||||
String sql = "UPDATE " + TABLE_NAME + " SET name=?, description=?, score=?, birthday=?, race=?, image_path=?, owner_id=?, updated_at=? WHERE id=?";
|
String sql = "UPDATE " + TABLE_NAME + " SET name=?, description=?, score=?, birthday=?, race=?, image_path=?, owner_id=?, updated_at=? WHERE id=?";
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@ -214,7 +214,7 @@ public class HorseJdbcDao implements HorseDao {
|
|||||||
@Override
|
@Override
|
||||||
public void deleteHorse(Long id) throws DataAccessException, NotFoundException, IOException {
|
public void deleteHorse(Long id) throws DataAccessException, NotFoundException, IOException {
|
||||||
Horse horseToDelete = this.findOneById(id);
|
Horse horseToDelete = this.findOneById(id);
|
||||||
LOGGER.trace("Delete horse with id {}", id);
|
LOGGER.debug("Delete horse with id {}", id);
|
||||||
final String sql = "DELETE FROM " + TABLE_NAME + " WHERE id=?";
|
final String sql = "DELETE FROM " + TABLE_NAME + " WHERE id=?";
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
@ -47,7 +47,7 @@ public class OwnerJdbcDao implements OwnerDao {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Owner findOneById(Long id) {
|
public Owner findOneById(Long id) {
|
||||||
LOGGER.trace("Get owner with id {}", id);
|
LOGGER.debug("Get owner with id {}", id);
|
||||||
final String sql = "SELECT * FROM " + TABLE_NAME + " WHERE id=?";
|
final String sql = "SELECT * FROM " + TABLE_NAME + " WHERE id=?";
|
||||||
List<Owner> owners = jdbcTemplate.query(sql, new Object[] { id }, this::mapRow);
|
List<Owner> owners = jdbcTemplate.query(sql, new Object[] { id }, this::mapRow);
|
||||||
|
|
||||||
@ -58,7 +58,7 @@ public class OwnerJdbcDao implements OwnerDao {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<Owner> getAll() throws NotFoundException {
|
public List<Owner> getAll() throws NotFoundException {
|
||||||
LOGGER.trace("Get all owners");
|
LOGGER.debug("Get all owners");
|
||||||
final String sql = "SELECT * FROM " + TABLE_NAME;
|
final String sql = "SELECT * FROM " + TABLE_NAME;
|
||||||
List<Owner> owners = jdbcTemplate.query(sql, new Object[] { }, this::mapRow);
|
List<Owner> owners = jdbcTemplate.query(sql, new Object[] { }, this::mapRow);
|
||||||
|
|
||||||
@ -69,7 +69,7 @@ public class OwnerJdbcDao implements OwnerDao {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<Owner> getFiltered(Map<String, String> filters) throws NotFoundException {
|
public List<Owner> getFiltered(Map<String, String> filters) throws NotFoundException {
|
||||||
LOGGER.trace("Get all owners with filters " + filters.entrySet());
|
LOGGER.debug("Get all owners with filters " + filters.entrySet());
|
||||||
final String sql = "SELECT * FROM " + TABLE_NAME + " WHERE UPPER(name) LIKE :name";
|
final String sql = "SELECT * FROM " + TABLE_NAME + " WHERE UPPER(name) LIKE :name";
|
||||||
|
|
||||||
// Create a list to hold the results
|
// Create a list to hold the results
|
||||||
@ -96,7 +96,7 @@ public class OwnerJdbcDao implements OwnerDao {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<Horse> getOwnedHorses(Long id) throws NotFoundException {
|
public List<Horse> getOwnedHorses(Long id) throws NotFoundException {
|
||||||
LOGGER.trace("Get all horses for owner with id " + id);
|
LOGGER.debug("Get all horses for owner with id " + id);
|
||||||
final String sql = "SELECT * FROM " + HORSE_TABLE_NAME + " WHERE owner_id=?";
|
final String sql = "SELECT * FROM " + HORSE_TABLE_NAME + " WHERE owner_id=?";
|
||||||
|
|
||||||
List<Horse> horses = jdbcTemplate.query(sql, new Object[] {id}, BeanPropertyRowMapper.newInstance(Horse.class));
|
List<Horse> horses = jdbcTemplate.query(sql, new Object[] {id}, BeanPropertyRowMapper.newInstance(Horse.class));
|
||||||
@ -108,7 +108,7 @@ public class OwnerJdbcDao implements OwnerDao {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Owner addOwner(Owner owner) {
|
public Owner addOwner(Owner owner) {
|
||||||
LOGGER.trace("Add owner {}", owner);
|
LOGGER.debug("Add owner {}", owner);
|
||||||
final String sql = "INSERT INTO " + TABLE_NAME + "(name, created_at, updated_at) VALUES(?,?,?)";
|
final String sql = "INSERT INTO " + TABLE_NAME + "(name, created_at, updated_at) VALUES(?,?,?)";
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@ -147,7 +147,7 @@ public class OwnerJdbcDao implements OwnerDao {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Owner updateOwner(Owner owner) throws DataAccessException {
|
public Owner updateOwner(Owner owner) throws DataAccessException {
|
||||||
LOGGER.trace("Update owner {}", owner.toString());
|
LOGGER.debug("Update owner {}", owner.toString());
|
||||||
String sql = "UPDATE " + TABLE_NAME + " SET name=?, updated_at=? WHERE id=?";
|
String sql = "UPDATE " + TABLE_NAME + " SET name=?, updated_at=? WHERE id=?";
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@ -186,7 +186,7 @@ public class OwnerJdbcDao implements OwnerDao {
|
|||||||
@Override
|
@Override
|
||||||
public void deleteOwner(Long id) throws DataAccessException, NotFoundException {
|
public void deleteOwner(Long id) throws DataAccessException, NotFoundException {
|
||||||
Owner ownerToDelete = this.findOneById(id);
|
Owner ownerToDelete = this.findOneById(id);
|
||||||
LOGGER.trace("Delete owner with id {}", id);
|
LOGGER.debug("Delete owner with id {}", id);
|
||||||
final String sql = "DELETE FROM " + TABLE_NAME + " WHERE id=?";
|
final String sql = "DELETE FROM " + TABLE_NAME + " WHERE id=?";
|
||||||
|
|
||||||
if (ownerOwnsHorses(id))
|
if (ownerOwnsHorses(id))
|
||||||
|
@ -35,19 +35,19 @@ public class SimpleHorseService implements HorseService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Horse findOneById(Long id) {
|
public Horse findOneById(Long id) {
|
||||||
LOGGER.trace("findOneById({})", id);
|
LOGGER.debug("findOneById({})", id);
|
||||||
return horseJdbcDao.findOneById(id);
|
return horseJdbcDao.findOneById(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<Horse> getAll() throws NotFoundException {
|
public List<Horse> getAll() throws NotFoundException {
|
||||||
LOGGER.trace("getAll()");
|
LOGGER.debug("getAll()");
|
||||||
return horseJdbcDao.getAll();
|
return horseJdbcDao.getAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<Horse> getFiltered(Map<String, String> filters) throws NotFoundException, ValidationException {
|
public List<Horse> getFiltered(Map<String, String> filters) throws NotFoundException, ValidationException {
|
||||||
LOGGER.trace("getFiltered({})", filters.entrySet());
|
LOGGER.debug("getFiltered({})", filters.entrySet());
|
||||||
this.validator.validateHorseFilter(filters);
|
this.validator.validateHorseFilter(filters);
|
||||||
return horseJdbcDao.getFiltered(filters);
|
return horseJdbcDao.getFiltered(filters);
|
||||||
}
|
}
|
||||||
@ -55,34 +55,34 @@ public class SimpleHorseService implements HorseService {
|
|||||||
@Override
|
@Override
|
||||||
public Horse addHorse(Horse horse) throws ValidationException, DataAccessException {
|
public Horse addHorse(Horse horse) throws ValidationException, DataAccessException {
|
||||||
this.validator.validateNewHorse(horse);
|
this.validator.validateNewHorse(horse);
|
||||||
LOGGER.trace("addHorse({})", horse.toString());
|
LOGGER.debug("addHorse({})", horse.toString());
|
||||||
return horseJdbcDao.addHorse(horse);
|
return horseJdbcDao.addHorse(horse);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Horse updateHorse(Horse horse) throws ValidationException, DataAccessException, IOException {
|
public Horse updateHorse(Horse horse) throws ValidationException, DataAccessException, IOException {
|
||||||
this.validator.validateUpdateHorse(horse);
|
this.validator.validateUpdateHorse(horse);
|
||||||
LOGGER.trace("updateHorse({})", horse.toString());
|
LOGGER.debug("updateHorse({})", horse.toString());
|
||||||
return horseJdbcDao.updateHorse(horse);
|
return horseJdbcDao.updateHorse(horse);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void deleteHorse(Long id) throws NotFoundException, DataAccessException, IOException {
|
public void deleteHorse(Long id) throws NotFoundException, DataAccessException, IOException {
|
||||||
LOGGER.trace("deleteHorse({})", id);
|
LOGGER.debug("deleteHorse({})", id);
|
||||||
horseJdbcDao.deleteHorse(id);
|
horseJdbcDao.deleteHorse(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void saveImage(MultipartFile img) throws ValidationException, IOException {
|
public void saveImage(MultipartFile img) throws ValidationException, IOException {
|
||||||
this.validator.validateHorseImage(img);
|
this.validator.validateHorseImage(img);
|
||||||
LOGGER.trace("saveImage({})", img.getName());
|
LOGGER.debug("saveImage({})", img.getName());
|
||||||
horseFileDao.save(img);
|
horseFileDao.save(img);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public byte[] getImage(String path) throws IOException, ValidationException {
|
public byte[] getImage(String path) throws IOException, ValidationException {
|
||||||
this.validator.validateImageRequest(path);
|
this.validator.validateImageRequest(path);
|
||||||
LOGGER.trace("getImage({})", path);
|
LOGGER.debug("getImage({})", path);
|
||||||
return horseFileDao.get(path);
|
return horseFileDao.get(path);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -33,46 +33,46 @@ public class SimpleOwnerService implements OwnerService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Owner findOneById(Long id) {
|
public Owner findOneById(Long id) {
|
||||||
LOGGER.trace("findOneById({})", id);
|
LOGGER.debug("findOneById({})", id);
|
||||||
return ownerDao.findOneById(id);
|
return ownerDao.findOneById(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<Owner> getAll() throws NotFoundException {
|
public List<Owner> getAll() throws NotFoundException {
|
||||||
LOGGER.trace("getAll()");
|
LOGGER.debug("getAll()");
|
||||||
return ownerDao.getAll();
|
return ownerDao.getAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<Owner> getFiltered(Map<String, String> filters) throws NotFoundException, ValidationException {
|
public List<Owner> getFiltered(Map<String, String> filters) throws NotFoundException, ValidationException {
|
||||||
LOGGER.trace("getFiltered({})", filters.entrySet());
|
LOGGER.debug("getFiltered({})", filters.entrySet());
|
||||||
this.validator.validateOwnerFilter(filters);
|
this.validator.validateOwnerFilter(filters);
|
||||||
return ownerDao.getFiltered(filters);
|
return ownerDao.getFiltered(filters);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<Horse> getOwnedHorses(Long id) throws NotFoundException {
|
public List<Horse> getOwnedHorses(Long id) throws NotFoundException {
|
||||||
LOGGER.trace("getOwnedHorses({})", id);
|
LOGGER.debug("getOwnedHorses({})", id);
|
||||||
return ownerDao.getOwnedHorses(id);
|
return ownerDao.getOwnedHorses(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Owner addOwner(Owner owner) throws ValidationException, DataAccessException {
|
public Owner addOwner(Owner owner) throws ValidationException, DataAccessException {
|
||||||
LOGGER.trace("addOwner({})", owner);
|
LOGGER.debug("addOwner({})", owner);
|
||||||
this.validator.validateNewOwner(owner);
|
this.validator.validateNewOwner(owner);
|
||||||
return ownerDao.addOwner(owner);
|
return ownerDao.addOwner(owner);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Owner updateOwner(Owner owner) throws ValidationException, DataAccessException {
|
public Owner updateOwner(Owner owner) throws ValidationException, DataAccessException {
|
||||||
LOGGER.trace("updateOwner({})", owner);
|
LOGGER.debug("updateOwner({})", owner);
|
||||||
this.validator.validateUpdateOwner(owner);
|
this.validator.validateUpdateOwner(owner);
|
||||||
return ownerDao.updateOwner(owner);
|
return ownerDao.updateOwner(owner);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void deleteOwner(Long id) throws NotFoundException, DataAccessException {
|
public void deleteOwner(Long id) throws NotFoundException, DataAccessException {
|
||||||
LOGGER.trace("deleteOwner({})", id);
|
LOGGER.debug("deleteOwner({})", id);
|
||||||
ownerDao.deleteOwner(id);
|
ownerDao.deleteOwner(id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
logging:
|
logging:
|
||||||
level:
|
level:
|
||||||
root: INFO
|
root: INFO
|
||||||
file:
|
|
||||||
name: ./log/wendys-friends.log
|
|
||||||
|
|
||||||
spring:
|
spring:
|
||||||
application:
|
application:
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
logging:
|
logging:
|
||||||
level:
|
level:
|
||||||
root: INFO
|
root: INFO
|
||||||
file:
|
|
||||||
name: ./log/wendys-friends.log
|
|
||||||
|
|
||||||
spring:
|
spring:
|
||||||
application:
|
application:
|
||||||
|
51
backend/src/main/resources/logback.xml
Normal file
51
backend/src/main/resources/logback.xml
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
<configuration>
|
||||||
|
<property name="root.level.console" value="WARN"/>
|
||||||
|
|
||||||
|
<timestamp key="day" datePattern="dd-MM-yyyy"/>
|
||||||
|
|
||||||
|
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
|
||||||
|
<encoder>
|
||||||
|
<pattern>%d{HH:mm:ss.SSS} | %-5level | %40logger{0}: %msg%n</pattern>
|
||||||
|
</encoder>
|
||||||
|
</appender>
|
||||||
|
|
||||||
|
<appender name="STDERR" class="ch.qos.logback.core.ConsoleAppender">
|
||||||
|
<target>System.err</target>
|
||||||
|
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
|
||||||
|
<level>ERROR</level>
|
||||||
|
</filter>
|
||||||
|
<encoder>
|
||||||
|
<pattern>%d{HH:mm:ss.SSS} | %-5level | %40logger{0}: %msg%n</pattern>
|
||||||
|
</encoder>
|
||||||
|
</appender>
|
||||||
|
|
||||||
|
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||||
|
<encoder>
|
||||||
|
<pattern>%d{HH:mm:ss.SSS} | %-5level | %40logger{0}: %msg%n</pattern>
|
||||||
|
</encoder>
|
||||||
|
|
||||||
|
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||||
|
<fileNamePattern>
|
||||||
|
log/wendys-friends-%d{dd-MM-yyyy}.log.gz
|
||||||
|
</fileNamePattern>
|
||||||
|
<maxHistory>1</maxHistory>
|
||||||
|
<totalSizeCap>100MB</totalSizeCap>
|
||||||
|
</rollingPolicy>
|
||||||
|
|
||||||
|
</appender>
|
||||||
|
|
||||||
|
<logger name="at.ac.tuwien.sepm.assignment.individual" level="DEBUG" additivity="false">
|
||||||
|
<appender-ref ref="STDOUT"/>
|
||||||
|
<appender-ref ref="FILE"/>
|
||||||
|
</logger>
|
||||||
|
|
||||||
|
<root level="WARN">
|
||||||
|
<appender-ref ref="STDOUT"/>
|
||||||
|
<appender-ref ref="FILE"/>
|
||||||
|
</root>
|
||||||
|
|
||||||
|
<root level="ERROR">
|
||||||
|
<appender-ref ref="STDERR"/>
|
||||||
|
<appender-ref ref="FILE"/>
|
||||||
|
</root>
|
||||||
|
</configuration>
|
Reference in New Issue
Block a user