https://github.com/yourssu/yls-web
Yourssu Logging System for Web
https://github.com/yourssu/yls-web
logging-library logging-system react yourssu
Last synced: 11 months ago
JSON representation
Yourssu Logging System for Web
- Host: GitHub
- URL: https://github.com/yourssu/yls-web
- Owner: yourssu
- License: mit
- Created: 2024-01-02T09:01:13.000Z (over 2 years ago)
- Default Branch: develop
- Last Pushed: 2024-05-24T07:54:33.000Z (about 2 years ago)
- Last Synced: 2024-11-20T03:11:38.475Z (over 1 year ago)
- Topics: logging-library, logging-system, react, yourssu
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/@yourssu/logging-system-react
- Size: 141 KB
- Stars: 6
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
## YLS란
YLS는 숭실대학교 동아리 유어슈에서 사용하는 로깅 시스템입니다.
사용자의 로그는 local storage에 담기며, 로그가 10개 쌓였을 경우/사용자가 이탈할 경우 백엔드 API를 호출해 로그를 전송합니다.
사용자의 userId는 YLS 내에서 식별 불가능 한 값으로 처리됩니다.
## Installation
```
npm install @yourssu/logging-system-react
yarn add @yourssu/logging-system-react
pnpm install @yourssu/logging-system-react
```
## Usage
YLS 내부에서는 timestamp와 platform을 처리합니다.
userId는 사용처에서 넣어주어야 하며, version과 event 내부 필드는 PM으로부터 전달받은 값을 넣어주어야 합니다.
### LogScreen
사용자가 진입한 화면을 추적합니다.
### LogClick
사용자의 클릭(이벤트)를 추적합니다.
```tsx
export const Home = () => {
const [count, setCount] = useState(0);
const router = useLocation();
return (
<>
setCount((count) => count + 1)}>count is {count}
>
);
};
```
## YLS를 사용하는 프로덕트
[Soomsil-Web](https://github.com/yourssu/Soomsil-Web)
## 타 버전 저장소
[YLS-Android](https://github.com/yourssu/YLS-Android)
[YLS-iOS](https://github.com/yourssu/YLS-iOS)
[YLS-Backend](https://github.com/yourssu/YLS-Backend)