-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #498 from ephemeraHQ/noe/native-logs
Implement the native logs method in debug menu
- Loading branch information
Showing
5 changed files
with
34 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { Client } from "@xmtp/react-native-sdk"; | ||
import path from "path"; | ||
import * as RNFS from "react-native-fs"; | ||
|
||
export const getNativeLogFile = async () => { | ||
const nativeLogs = (await Client.exportNativeLogs()) as string; | ||
const nativeLogFilePath = path.join( | ||
RNFS.TemporaryDirectoryPath, | ||
"libxmtp.logs.txt" | ||
); | ||
await RNFS.writeFile(nativeLogFilePath, nativeLogs, "utf8"); | ||
return nativeLogFilePath; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters