@@ -48,8 +48,8 @@ public class UserPillService {
4848 private User getUserByEmail (String email ) {
4949 return userRepository .findByEmail (email )
5050 .orElseThrow (() -> {
51- log .warn ("[UserPillService] μ΄λ©μΌλ‘ μ μ μ‘°ν μ€ν¨: {}" , email );
52- return new IllegalArgumentException ("ν΄λΉ μ΄λ©μΌ μ¬μ©μλ₯Ό μ°Ύμ μ μμ΅λλ€." );
51+ log .warn ("@@@@@ [UserPillService] μ΄λ©μΌλ‘ μ μ μ‘°ν μ€ν¨: {}@@@@@ " , email );
52+ return new IllegalArgumentException ("ν΄λΉ μ΄λ©μΌ μ¬μ©μλ₯Ό μ°Ύμ μ μμ΅λλ€: " + email );
5353 });
5454 }
5555
@@ -58,7 +58,7 @@ private IntakeOption parseOption(String option) {
5858 try {
5959 return IntakeOption .valueOf (option );
6060 } catch (Exception e ) {
61- log .warn ("[UserPillService] IntakeOption νμ± μ€ν¨: {}" , option );
61+ log .warn ("@@@@@ [UserPillService] IntakeOption νμ± μ€ν¨: {}@@@@@ " , option );
6262 throw new IllegalArgumentException ("μ§μνμ§ μλ μ΅μ
μ
λλ€: " + option );
6363 }
6464 }
@@ -68,7 +68,7 @@ private LocalDate parseStartDate(String dateStr) {
6868 try {
6969 return LocalDate .parse (dateStr );
7070 } catch (DateTimeParseException e ) {
71- log .warn ("[UserPillService] λ μ§ νμ± μ€ν¨: {}" , dateStr );
71+ log .warn ("@@@@@ [UserPillService] λ μ§ νμ± μ€ν¨: {}@@@@@ " , dateStr );
7272 throw new IllegalArgumentException ("λ μ§ νμμ΄ μ¬λ°λ₯΄μ§ μμ΅λλ€: " + dateStr );
7373 }
7474 }
@@ -83,13 +83,13 @@ public IntakeOption saveUserPill(UserPillRequest dto, String email) {
8383 for (UserPill up : existing ) {
8484 intakeRecordRepository .deleteByUserPill (up );
8585 userPillRepository .delete (up );
86- log .info ("[UserPillService] κΈ°μ‘΄ UserPill λ° κΈ°λ‘ μμ : user={}. userPillID=[] " , email , up .getUserPillId ());
86+ log .info ("@@@@@ [UserPillService] κΈ°μ‘΄ UserPill λ° κΈ°λ‘ μμ : user={}. userPillID={}@@@@@ " , email , up .getUserPillId ());
8787 }
8888
8989 // dtoμμ optionμ κ°μ Έμ IntakeOptionμΌλ‘ λ³ν
9090 IntakeOption option = parseOption (dto .getOption ());
9191 IntakeInfo intakeInfo = intakeInfoRepository .save (IntakeInfo .builder ().option (option ).build ());
92- log .info ("[UserPillService] IntakeInfo μ μ₯: {}" , intakeInfo );
92+ log .info ("@@@@@ [UserPillService] IntakeInfo μ μ₯: {}@@@@@ " , intakeInfo );
9393
9494 // μμ λ μ§ νμ±
9595 LocalDate startDate = parseStartDate (dto .getStartDate ());
@@ -114,11 +114,11 @@ public IntakeOption saveUserPill(UserPillRequest dto, String email) {
114114 .build ();
115115
116116 userPillRepository .save (userPill );
117- log .info ("[UserPillService] UserPill μ μ₯ μ±κ³΅: {}" , userPill );
117+ log .info ("@@@@@ [UserPillService] UserPill μ μ₯ μ±κ³΅: {}@@@@@ " , userPill );
118118
119119 // μ΄κΈ° κΈ°λ‘ μΈμ€ν΄μ€ μμ±
120120 intakeRecordInitService .createInitialRecords (startDate , option , userPill );
121- log .info ("[UserPillService] IntakeRecord μ΄κΈ°ν μλ£" );
121+ log .info ("@@@@@ [UserPillService] IntakeRecord μ΄κΈ°ν μλ£@@@@@ " );
122122 return option ;
123123 }
124124
@@ -127,7 +127,7 @@ public IntakeOption updateUserPill(UserPillRequest dto, String email) {
127127 User user = getUserByEmail (email );
128128 // κΈ°μ‘΄ UserPill μ‘°ν
129129 UserPill userPill = userPillRepository .findByUser (user ) .orElseThrow (() -> {
130- log .warn ("[UserPillService] μ½ λ³΅μ© μ 보 μμ: user={}" , email );
130+ log .warn ("@@@@@ [UserPillService] μ½ λ³΅μ© μ 보 μμ: user={}@@@@@ " , email );
131131 return new IllegalArgumentException ("μ½ λ³΅μ© μ λ³΄κ° μμ΅λλ€: " + email );
132132 });
133133
@@ -136,7 +136,7 @@ public IntakeOption updateUserPill(UserPillRequest dto, String email) {
136136 IntakeInfo intakeInfo = userPill .getIntakeInfo ();
137137 intakeInfo .setOption (newOption );
138138 intakeInfoRepository .save (intakeInfo );
139- log .info ("[UserPillService] IntakeInfo μ
λ°μ΄νΈ μ±κ³΅: {}" , intakeInfo );
139+ log .info ("@@@@@ [UserPillService] IntakeInfo μ
λ°μ΄νΈ μ±κ³΅: {}@@@@@ " , intakeInfo );
140140
141141 LocalDate newStartDate = parseStartDate (dto .getStartDate ());
142142 userPill .setStartDate (newStartDate );
@@ -155,18 +155,18 @@ public IntakeOption updateUserPill(UserPillRequest dto, String email) {
155155 userPill .setNextPurchaseAlert (nextPurchaseAlert );
156156
157157 userPillRepository .save (userPill );
158- log .info ("μ¬μ©μ {}μ μ½ λ³΅μ© μ 보 μ
λ°μ΄νΈ μλ£: option={}, startDate={}" , email , newOption , dto .getStartDate ());
158+ log .info ("@@@@@ μ¬μ©μ {}μ μ½ λ³΅μ© μ 보 μ
λ°μ΄νΈ μλ£: option={}, startDate={}@@@@@ " , email , newOption , dto .getStartDate ());
159159
160160 // 1. κΈ°μ‘΄ IntakeRecord λͺ¨λ μμ
161161 intakeRecordRepository .deleteByUserPill (userPill );
162- log .info ("[UserPillService] κΈ°μ‘΄ IntakeRecord μμ " );
162+ log .info ("@@@@@ [UserPillService] κΈ°μ‘΄ IntakeRecord μμ @@@@@ " );
163163 // 2. μλ‘μ΄ IntakeRecord μμ±
164164 intakeRecordInitService .createInitialRecords (
165165 userPill .getStartDate (),
166166 newOption ,
167167 userPill
168168 );
169- log .info ("[UserPillService] μλ‘μ΄ IntakeRecord μμ±" );
169+ log .info ("@@@@@ [UserPillService] μλ‘μ΄ IntakeRecord μμ±@@@@@ " );
170170 return newOption ;
171171 }
172172
@@ -177,14 +177,14 @@ public UserPillRemainResponse getCurrentRemain(String email) {
177177 .orElseThrow (() -> new IllegalArgumentException ("μ¬μ©μλ₯Ό μ°Ύμ μ μμ΅λλ€: " + email ));
178178 UserPill userPill = userPillRepository .findByUser (user )
179179 .orElseThrow (() -> {
180- log .warn ("[UserPillService] μλ μ‘°ν: μ½ λ³΅μ© μ 보 μμ: user={}" , email );
180+ log .warn ("@@@@@ [UserPillService] μλ μ‘°ν: μ½ λ³΅μ© μ 보 μμ: user={}@@@@@ " , email );
181181 return new IllegalArgumentException ("μ½ λ³΅μ© μ λ³΄κ° μμ΅λλ€: " + email );
182182 });
183183
184- log .info ("[UserPillService] μλ μ‘°ν μ±κ³΅: user={}, remain={}" , email , userPill .getCurrentRemain ());
184+ log .info ("@@@@@ [UserPillService] μλ μ‘°ν μ±κ³΅: user={}, remain={}@@@@@ " , email , userPill .getCurrentRemain ());
185185 return new UserPillRemainResponse (userPill .getCurrentRemain ());
186186 } catch (Exception e ) {
187- log .error ("[UserPillService] μλ μ‘°ν μ€ μμΈ: user={}, error={}" , email , e .getMessage ());
187+ log .error ("@@@@@ [UserPillService] μλ μ‘°ν μ€ μμΈ: user={}, error={}@@@@@ " , email , e .getMessage ());
188188 throw e ;
189189 }
190190 }
@@ -196,7 +196,7 @@ public TodayPillResponse getPillTimeLeft(String email) {
196196
197197 UserPill userPill = userPillRepository .findByUser (user )
198198 .orElseThrow (() -> {
199- log .warn ("[UserPillService] minutes-left: μ½ λ³΅μ© μ 보 μμ: user={}" , email );
199+ log .warn ("@@@@@ [UserPillService] minutes-left: μ½ λ³΅μ© μ 보 μμ: user={}@@@@@ " , email );
200200 return new IllegalArgumentException ("μ½ λ³΅μ© μ λ³΄κ° μμ΅λλ€: " + email );
201201 });
202202
@@ -209,7 +209,7 @@ public TodayPillResponse getPillTimeLeft(String email) {
209209 Optional <NotificationSettings > notiOpt = notificationSettingsRepository .findByUserAndType (user , NotificationType .PILL_INTAKE );
210210
211211 if (notiOpt .isEmpty () || notiOpt .get ().getNotificationTime () == null ) {
212- log .warn ("[UserPillService] minutes-left: μλ¦Ό μ€μ μμ or μκ° λ―Έμ€μ : user={}" , email );
212+ log .warn ("@@@@@ [UserPillService] minutes-left: μλ¦Ό μ€μ μμ or μκ° λ―Έμ€μ : user={}@@@@@ " , email );
213213 return new TodayPillResponse (isTaken , null );
214214 }
215215
@@ -221,15 +221,15 @@ public TodayPillResponse getPillTimeLeft(String email) {
221221
222222 // (μ΄λ―Έ λ¨Ήμκ±°λ μκ°μ΄ μ§λ¬μΌλ©΄ 0)
223223 if (isTaken || minutesLeft < 0 ) {
224- log .info ("[UserPillService] minutes-left: μ΄λ―Έ λ³΅μ© or μκ° μ§λ¨: user={}, isTaken={}, minutesLeft={}" , email , isTaken , minutesLeft );
224+ log .info ("@@@@@ [UserPillService] minutes-left: μ΄λ―Έ λ³΅μ© or μκ° μ§λ¨: user={}, isTaken={}, minutesLeft={}@@@@@ " , email , isTaken , minutesLeft );
225225 minutesLeft = 0 ;
226226 } else {
227- log .info ("[UserPillService] minutes-left: user={}, isTaken={}, minutesLeft={}" , email , isTaken , minutesLeft );
227+ log .info ("@@@@@ [UserPillService] minutes-left: user={}, isTaken={}, minutesLeft={}@@@@@ " , email , isTaken , minutesLeft );
228228 }
229229
230230 return new TodayPillResponse (isTaken , minutesLeft );
231231 } catch (Exception e ) {
232- log .error ("[UserPIllService] minutes-left μ‘°ν μ€ μμΈ: user={}, error={}" , email , e .getMessage ());
232+ log .error ("@@@@@ [UserPIllService] minutes-left μ‘°ν μ€ μμΈ: user={}, error={}@@@@@ " , email , e .getMessage ());
233233 throw e ;
234234 }
235235 }
0 commit comments