2

I am doing a project in react native in which custom logs and device logs have to be captured in a text file.

I have explored react-native-logger but it's not creating any specific file. can some one guide me?

2
  • There some services which you can use to capture crash reports etc.[1][2] Commented Mar 13, 2017 at 15:00
  • instead of writing to file async mode. you can keep logs in memory and on certain interval or app in background you can write in file. Commented Mar 13, 2017 at 17:48

1 Answer 1

3

You could use following package to write into file: react-native-fs

Sign up to request clarification or add additional context in comments.

3 Comments

I have gone through this earlier .But even during production if the file write is happening then there will be some latency right ?
Sure. You can't write a file synchronously. Can you give me an exact usecase of your problem? Probably we can find a better way to do it instead of writing into a file.
Scenario is like am doing a db operation where in which i wish to record all the flow in a log file so that even if there is any malfunction happens i can pull out the log file to check the issue any time.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.