StevenSunzh / android-logging-log4j

Automatically exported from code.google.com/p/android-logging-log4j
0 stars 0 forks source link

Trying to implement the logger gives a FileNotFoundException #2

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Follow the instructions provided on the site and import all the jars for 
log4j and slf4j
2. Create the logConfigurator as shown in the example
3. Write a log info for an example
4. Add to the manifest the permisions android.permission.WRITE_EXTERNAL_STORAGE

What is the expected output? What do you see instead?
I get the following eror
E/AndroidRuntime(408): Caused by: java.io.FileNotFoundException: 
/sdcard/speedy.log

What version of the product are you using? On what operating system?
I am using version 1.0.2 of the product in the windows xp, eclipse environment

Please provide any additional information below.

Original issue reported on code.google.com by sparktro...@gmail.com on 14 May 2012 at 11:21

GoogleCodeExporter commented 8 years ago
It seems that the path you used for yoour log file location 
"/sdcard/speedy.log" does not exists. Please try to change the path a  valid 
path and try again.

Original comment by rolf.kul...@gmail.com on 14 May 2012 at 6:27

GoogleCodeExporter commented 8 years ago
weird, I used your code sample:

Environment.getExternalStorageDirectory() 

as you said, if you change the dir to "data/data/myapp.com/logs/" it works.

thanks!

Original comment by sparktro...@gmail.com on 14 May 2012 at 7:42

GoogleCodeExporter commented 8 years ago

Original comment by rolf.kul...@gmail.com on 14 May 2012 at 8:51