ELK stands for ElasticSearch, Logstash, and Kibana. It is an open-source stack for collecting, storing, analyzing, and visualizing log data and other types of data. Each component has the following roles:
The reason I explored this topic was to understand how ElasticSearch can be used to analyze logs generated by the app.
To convert a date string into a Date
type, DateFormatter
can be used to transform the type from String
→ Date
.
While working with date conversions, I discovered some important considerations:
DateFormatter
needs to know the format of the date string. For defining the year format, both yyyy
and YYYY
can be used, but there are differences:yyyy
represents the calendar year, whereas YYYY
is week-based. Errors can occur at the end of the year because a week-based year considers a week to belong to the next year if even a single day of the week falls in the new year.TimeZone
is set to Korea, there was an issue where a date string like 1956.05.20
was not correctly formatted. This seems related to Daylight Saving Time (DST). In the past, South Korea adopted the summer time policy, advancing the clock by 1 hour during summer. While this policy is no longer in use in Korea, some countries still use it, so it’s important to account for such policies when working with dates.var formatter = DateFormatter()
formatter.dateFormat = "yyyy.MM.dd"
formatter.locale = Locale(identifier: "ko_KR")
formatter.timeZone = TimeZone(identifier: "Asia/Seoul")
let returnDate = formatter.date(from: "1956.05.20")
print(returnDate ?? "")
The following example shows that the returnDate
becomes nil
when the TimeZone
is set to Seoul, but works correctly when set to other countries.
When using Apple Login, there is an option called “Hide My Email”. If this option is selected during sign-up, a random email address is generated with the domain privaterelay.appleid.com.
Additionally, the “Hide My Email” option is also available in iCloud, but it requires a paid iCloud+ subscription.
This service allows users to create random email addresses independently of Apple Login. It’s important not to confuse the two services.