Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/config
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,17 @@ import org.springframework.mail.javamail.JavaMailSenderImpl
@Configuration
@Profile("prod")
class GmailFallbackMailConfig(
@Value("\${maggom.mail.fallback.host}") private val host: String,
@Value("\${maggom.mail.fallback.port}") private val port: Int,
@Value("\${maggom.mail.fallback.username}") private val username: String,
@Value("\${maggom.mail.fallback.password}") private val password: String,
) {

@Bean("gmailMailSender")
fun gmailMailSender(): JavaMailSender {
return JavaMailSenderImpl().apply {
host = "smtp.gmail.com"
port = 587
host = this@GmailFallbackMailConfig.host
port = this@GmailFallbackMailConfig.port
this.username = username
this.password = password
javaMailProperties.apply {
Expand Down
12 changes: 6 additions & 6 deletions app/src/main/resources/logback-spring.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>

<include resource="org/springframework/boot/logging/logback/defaults.xml"/>

<property name="LOG_PATTERN" value="%d{yyyy-MM-dd HH:mm:ss.SSS} %5p --- %-40.40logger{40} : %m%n%wEx"/>

<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
Expand All @@ -9,6 +11,10 @@
</encoder>
</appender>

<root level="INFO">
<appender-ref ref="CONSOLE"/>
</root>

<springProfile name="prod">
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
Expand All @@ -29,10 +35,4 @@
<logger name="com.zaxxer.hikari" level="WARN"/>
</springProfile>

<springProfile name="!prod">
<root level="INFO">
<appender-ref ref="CONSOLE"/>
</root>
</springProfile>

</configuration>
Loading