Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Naming Convention] logger -> log #97

Merged
merged 1 commit into from
Jun 29, 2023
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
4 changes: 2 additions & 2 deletions api/src/main/kotlin/filter/ErrorWebFilter.kt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import reactor.core.publisher.Mono
class ErrorWebFilter(
private val objectMapper: ObjectMapper,
) : WebFilter {
private val logger = LoggerFactory.getLogger(javaClass)
private val log = LoggerFactory.getLogger(javaClass)

override fun filter(exchange: ServerWebExchange, chain: WebFilterChain): Mono<Void> {
return chain.filter(exchange)
Expand All @@ -37,7 +37,7 @@ class ErrorWebFilter(
)
}
else -> {
logger.error(throwable.message, throwable)
log.error(throwable.message, throwable)
httpStatusCode = HttpStatus.INTERNAL_SERVER_ERROR
errorBody = makeErrorBody(Snu4tException())
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ interface SugangSnuFetchService {
class SugangSnuFetchServiceImpl(
private val sugangSnuRepository: SugangSnuRepository,
) : SugangSnuFetchService {
private val logger = LoggerFactory.getLogger(javaClass)
private val log = LoggerFactory.getLogger(javaClass)
private val quotaRegex = """(?<quota>\d+)(\s*\((?<quotaForCurrentStudent>\d+)\))?""".toRegex()

override suspend fun getSugangSnuLectures(year: Int, semester: Semester): List<Lecture> =
Expand Down Expand Up @@ -56,7 +56,7 @@ class SugangSnuFetchServiceImpl(
this[
columnNameIndex.getOrElse(key) {
// TODO: slack 메시지로 보내기
logger.error("$key 와 매칭되는 excel 컬럼이 존재하지 않습니다.")
log.error("$key 와 매칭되는 excel 컬럼이 존재하지 않습니다.")
this.size
}
].stringCellValue
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import org.slf4j.LoggerFactory
import java.text.DecimalFormat

object SugangSnuClassTimeUtils {
private val logger = LoggerFactory.getLogger(javaClass)
private val log = LoggerFactory.getLogger(javaClass)
private val classTimeRegEx =
"""^(?<day>[월화수목금토일])\((?<startHour>\d{2}):(?<startMinute>\d{2})~(?<endHour>\d{2}):(?<endMinute>\d{2})\)$""".toRegex()
private val periodFormat = DecimalFormat("#.#")
Expand Down Expand Up @@ -35,7 +35,7 @@ object SugangSnuClassTimeUtils {
}
.sortedWith(compareBy({ it.day.value }, { it.startMinute }))
}.getOrElse {
logger.error("classtime으로 변환 실패 (time: {}, location: {})", classTimesText, locationsText)
log.error("classtime으로 변환 실패 (time: {}, location: {})", classTimesText, locationsText)
emptyList()
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,15 @@ class VacancyNotifierServiceImpl(
private const val DELAY_PER_CHUNK = 300L
}

private val logger = LoggerFactory.getLogger(javaClass)
private val log = LoggerFactory.getLogger(javaClass)
private val courseNumberRegex = """(?<courseNumber>.*)\((?<lectureNumber>\d+)\)""".toRegex()

override suspend fun noti(coursebook: Coursebook): VacancyNotificationJobResult {
logger.info("시작")
log.info("시작")
val registrationStatus = runCatching {
getRegistrationStatus()
}.getOrElse {
logger.error("부하기간")
log.error("부하기간")
return VacancyNotificationJobResult.OVERLOAD_PERIOD
}
if (registrationStatus.all { it.registrationCount == 0 }) return VacancyNotificationJobResult.REGISTRATION_IS_NOT_STARTED
Expand Down Expand Up @@ -82,7 +82,7 @@ class VacancyNotifierServiceImpl(
lectureService.upsertLectures(updated)

notiTargetLectures.forEach {
logger.info("이름: ${it.courseTitle}, 강좌번호: ${it.courseNumber}, 분반번호: ${it.lectureNumber}")
log.info("이름: ${it.courseTitle}, 강좌번호: ${it.courseNumber}, 분반번호: ${it.lectureNumber}")
}

supervisorScope {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ class FirebaseDynamicLinkClient(
@Value("\${google.firebase.dynamic-link.ios.bundle-id}") val iosBundleId: String,
@Value("\${google.firebase.dynamic-link.ios.app-store-id:#{null}}") val iosAppStoreId: String?,
) : DynamicLinkClient {

private val logger = LoggerFactory.getLogger(javaClass)
private val log = LoggerFactory.getLogger(javaClass)

companion object {
const val SHORT_LINK_PATH = "shortLinks"
Expand All @@ -47,7 +46,7 @@ class FirebaseDynamicLinkClient(
.retrieve()
.awaitBody<DynamicLinkResponse>()
}.getOrElse {
logger.error("링크 생성 실패 (payload: {}, error: {}", dynamicLinkRequest, it.message)
log.error("링크 생성 실패 (payload: {}, error: {}", dynamicLinkRequest, it.message)
throw DynamicLinkGenerationFailedException
}

Expand Down