diff --git a/package-lock.json b/package-lock.json index ac5d02c..fd44851 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9103,6 +9103,12 @@ "resolved": "https://registry.npmjs.org/react-native-linear-gradient/-/react-native-linear-gradient-2.5.6.tgz", "integrity": "sha512-HDwEaXcQIuXXCV70O+bK1rizFong3wj+5Q/jSyifKFLg0VWF95xh8XQgfzXwtq0NggL9vNjPKXa016KuFu+VFg==" }, + "react-native-logs": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/react-native-logs/-/react-native-logs-2.2.1.tgz", + "integrity": "sha512-yWS2sPy3ZksYBt9C6Ga7YkBWOFT3E/onLluyci42iv29MWcQim0i59vUmZgIFgg2NwC04IQi04xfK5GiSZvyrQ==", + "dev": true + }, "react-native-simple-crypto": { "version": "0.2.13", "resolved": "https://registry.npmjs.org/react-native-simple-crypto/-/react-native-simple-crypto-0.2.13.tgz", diff --git a/package.json b/package.json index 004201f..a14573f 100644 --- a/package.json +++ b/package.json @@ -29,6 +29,7 @@ "react": "16.13.1", "react-native": "0.63.2", "react-native-linear-gradient": "^2.5.6", + "react-native-logs": "^2.2.1", "react-native-simple-crypto": "^0.2.13", "react-native-vector-icons": "^7.0.0", "react-redux": "^7.2.1", diff --git a/utils/logger.ts b/utils/logger.ts new file mode 100644 index 0000000..80fa5ab --- /dev/null +++ b/utils/logger.ts @@ -0,0 +1,5 @@ +import { logger } from 'react-native-logs'; + +const log = logger.createLogger(); + +export default log; diff --git a/utils/playlist.ts b/utils/playlist.ts index abf5f26..dfeb8d3 100644 --- a/utils/playlist.ts +++ b/utils/playlist.ts @@ -10,6 +10,7 @@ import firestore from '@react-native-firebase/firestore'; import RNSimpleCrypto from 'react-native-simple-crypto'; import { song } from '../components/PlaylistDetails'; +import log from './logger'; export const getPlaylistDetails = async (link: string) => { try { @@ -17,6 +18,8 @@ export const getPlaylistDetails = async (link: string) => { `https://us-central1-play-mo.cloudfunctions.net/getPlaylistInfo/?link=${link}`, ); + log.info(response); + const json = await response.json(); if (json.message && _.startsWith(json.message, "Can't use")) {