Logging in Symbian based phones

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



#ifndef PJ_LOG_MAX_LEVEL
#  define PJ_LOG_MAX_LEVEL   6
#endif

in pjlib/include/pj/config.h. I think you are using symbian_ua_gui or
symbian_ua application.

If you use symbian_ua application it should work by default. because below
line is declared by default and log is enabled.

  log_cfg.log_filename = pj_str("C:\\data\\symbian_ua.log");

for symbian_ua_gui you just need to add that line. No need to do any other
modfication. it should work. Where are you checking logs?

it should be phones data folder and emulators epoc --> C folder.

On Sat, Dec 24, 2011 at 5:31 PM, Austin Einter <austin.einter at gmail.com>wrote:

> Hi
> Thanks for information.
>
> I see in source code there are number of config files, such as config.h ,
> config_site.h and config_site_sample.h in path pjlib\include\pj path.
>
> It looks config.h include config_site.h and config_site.h includes
> config_site_sample.h.
> In config_site_sample.h, there are not much log related marcros, however
> in config.h, I see below macros.
>
> #ifndef PJ_LOG_MAX_LEVEL
> #  define PJ_LOG_MAX_LEVEL   5
> #endif
>
> #ifndef PJ_LOG_MAX_SIZE
> #  define PJ_LOG_MAX_SIZE     4000
> #endif
>
> #ifndef PJ_LOG_USE_STACK_BUFFER
> #  define PJ_LOG_USE_STACK_BUFFER   1
> #endif
> I hope with this, logging is enabled.
>
>
> I took a look at log function. I hope below function is called for logging.
>
>
>  static void log_writer(int level, const char *buf, int len)
>  {
>  static wchar_t buf16[PJ_LOG_MAX_SIZE];
>  PJ_UNUSED_ARG(level);
> * if (!g_cb.on_info)
>   return;*
>  pj_ansi_to_unicode(buf, len, buf16, PJ_ARRAY_SIZE(buf16));
>  g_cb.on_info(buf16);
>  }
>
> I checked in all the files, I never saw anywhere  *g_cb.on_info* is set
> anywhere. Is it the problem, why the log file is not generated.
>
> Probably with
> * if (!g_cb.on_info)
>   return;  *
> control is returning and not writing log into file.
>
> Please let me know, if I am referring right function.
>
> Thanks
> Austin
>
> On Sat, Dec 24, 2011 at 1:16 PM, Salauddin Rubel <
> salauddinrubelbd at gmail.com> wrote:
>
>> mention the path like this
>>
>> pj_str("C:\\data\\*log\\pjsiplog.txt*")
>>
>> you will get the log in respective path of your mobile.also enable your
>> log from pjlib ----   config.h and define log level in your program.
>>
>>   On Sat, Dec 24, 2011 at 8:35 AM, Austin Einter <austin.einter at gmail.com
>> > wrote:
>>
>>>   Hi
>>> I am using pjproject-1.12 source. Compiled source code in Carbide using
>>> FP2 SDK.
>>> I was able to install .sisx file in symbian phone (E-72). The phone is
>>> able to register with proxy server.
>>> However the calls are not going. I wanted to debug why the calls are not
>>> going.
>>>
>>> I am bit new to symbian platform. Can somebody provide ways how do we
>>> debug in symbian phones. When some scenario is not working , what is the
>>> best way to find out root cause. In windows or linux, we can do debugging
>>> and find the root cause, in symbian how to do that?
>>>
>>> I wanted to generate log file, so that I can know whats going on.
>>>
>>> I located a file symbian_ua.cpp in symbian_ua_gui.mmp project.
>>> In that file, there is a function *int* symbian_ua_init().
>>> I saw a piece of code as below.
>>>
>>>     pjsua_logging_config_default(&log_cfg);
>>>     log_cfg.console_level = LOG_LEVEL;
>>>     log_cfg.cb = &log_writer;
>>>     log_cfg.decor = 0;
>>>     status = pjsua_init(&cfg, &log_cfg, &med_cfg);
>>>
>>> While I was searching in google, how I can generate log file,
>>> somewhere I found, I need to set the log level and file name.
>>>
>>> So I modified above code to
>>>
>>>
>>>     pjsua_logging_config_default(&log_cfg);
>>> *    log_cfg.log_filename = pj_str("pjsiplog.txt");
>>>     log_cfg.level = LOG_LEVEL;
>>> *    log_cfg.console_level = LOG_LEVEL;
>>>     log_cfg.cb = &log_writer;
>>>     log_cfg.decor = 0;
>>>     status = pjsua_init(&cfg, &log_cfg, &med_cfg);
>>> After that I did a clean build, installed sisx file in my mobile and
>>> executed registration, calls, and when I tried to locate *pjsiplog.txt*file , I could not locate it in my target device (E-72). Looks the log file
>>> is never generated.
>>>
>>> Can somebody help me how  I can generate log file for PJSIP in symbian.
>>>
>>> Best Regards
>>> Austin
>>>
>>>
>>> _______________________________________________
>>> Visit our blog: http://blog.pjsip.org
>>>
>>> pjsip mailing list
>>> pjsip at lists.pjsip.org
>>> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
>>>
>>>
>>
>> _______________________________________________
>> Visit our blog: http://blog.pjsip.org
>>
>> pjsip mailing list
>> pjsip at lists.pjsip.org
>> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
>>
>>
>
> _______________________________________________
> Visit our blog: http://blog.pjsip.org
>
> pjsip mailing list
> pjsip at lists.pjsip.org
> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20111224/f42a4084/attachment.html>


[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux