×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Nov 2010
    Posts
    43

    logging with microlog

    Hello All,

    I am trying to do logging in my device using microlog with following code:

    Code:
        static public void initLogger() {
        	logger = LoggerFactory.getLogger();
        	FileAppender fileAppender = new FileAppender();
        	fileAppender.setFileName(logfile);
        	logger.addAppender(fileAppender);
        }
    where lofile is :

    logfile = System.getProperty("fileconn.dir.photos")+"mylogger.txt";

    But this always gives me invalid filename exception can anybody give me a reason for this ??

    Regards.

  2. #2
    Nokia Developer Champion
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    3,073

    Re: logging with microlog

    Quote Originally Posted by proj_symbian View Post
    Hello All,

    I am trying to do logging in my device using microlog with following code:

    Code:
        static public void initLogger() {
        	logger = LoggerFactory.getLogger();
        	FileAppender fileAppender = new FileAppender();
        	fileAppender.setFileName(logfile);
        	logger.addAppender(fileAppender);
        }
    where lofile is :

    logfile = System.getProperty("fileconn.dir.photos")+"mylogger.txt";

    But this always gives me invalid filename exception can anybody give me a reason for this ??

    Regards.
    Which device are you testing this on ?
    Did you check on emulator ?

    Try String logfile = System.getProperty("fileconn.dir.photos")+"/mylogger.txt";
    and also String logfile = System.getProperty("fileconn.dir.photos")+"mylogger.txt";

    1 of them should work.
    thanks,
    ~Amitabh
    (Champion of the Month -Aug'13)
    Follow me on my blog for Innovative Mobile Apps

Similar Threads

  1. Message logging and MMS logging
    By shwetadseema in forum Mobile Java Networking & Messaging & Security
    Replies: 0
    Last Post: 2011-02-16, 08:38
  2. How use microlog to save the logging into a file?
    By miluit01 in forum Mobile Java Networking & Messaging & Security
    Replies: 1
    Last Post: 2010-12-09, 15:49
  3. E62's IM not logging on
    By Kash811 in forum General Messaging
    Replies: 1
    Last Post: 2009-05-11, 21:56
  4. Anyone uses microlog FileAppender?
    By haploidus in forum Mobile Java Tools & SDKs
    Replies: 9
    Last Post: 2009-04-23, 11:16
  5. Logging during ODD
    By santhosh1980 in forum Symbian Tools & SDKs
    Replies: 3
    Last Post: 2008-01-11, 13:25

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •