mirror of
https://github.com/inaturalist/iNaturalistReactNative.git
synced 2025-12-23 22:18:36 -05:00
* Set up logging for user signing in and out * Set up button to email debug logs in About; closes #357 * Fix bug where signOut called too many times in App; code cleanup * Add mocks to RNFS to get Auth tests passing * Add simple test to make sure mailer is called on button press * Added a file sharing fallback when Mail is not available in iOS * Rename log extension Co-authored-by: Ken-ichi Ueda <kenichi.ueda@gmail.com>
24 lines
398 B
JavaScript
24 lines
398 B
JavaScript
import RNFS from "react-native-fs";
|
|
import {
|
|
fileAsyncTransport,
|
|
logger
|
|
} from "react-native-logs";
|
|
|
|
const fileName = "inaturalist-rn-log.txt";
|
|
const logFilePath = `${RNFS.DocumentDirectoryPath}/${fileName}`;
|
|
|
|
const config = {
|
|
transport: fileAsyncTransport,
|
|
transportOptions: {
|
|
FS: RNFS,
|
|
fileName
|
|
}
|
|
};
|
|
|
|
const log = logger.createLogger( config );
|
|
|
|
export {
|
|
log,
|
|
logFilePath
|
|
};
|