AP
Andres Perez
Tue, Feb 16, 2016 2:00 PM
Hi,
I want to use pjsip for an android VoIP application.
I am using native functions to call libpjsua2.so methods. libpjsua2 was
obtained in the way described in Getting-Started/Android: first building
all pj* folders to obtain libpj*.a, and then running /pjsip-apps/src/swig/make
to build libpjsua2 and swig bindings (which I don't use anyway).
I am unable to get any log message through LogCat. I am working with
Android Studio 1.5, gradle experimental 0.2.0.
In the android documentation, under "Debugging native code with Eclipse",
it is advised to use the compiler flag CFLAGS += -g (for example by adding
it to user.mak when building static libraries).
I have followed that point, but I think it is even not necessary, since in
the output of ./configure-android says CFLAGS = -fpic -ffunction-sections
-funwind-tables -no-canonical-prefixes -march=armv7-a -mfpu=vfpv3-d16
-mfloat-abi=softfp -mthumb -Os -g (...) by default.
I think that I'm having some kind of issue with libs compilation that does
not configure logs properly, but I could not find any further
documentation.
Thank you for your attention.
Best,
Andrés
--
\A/
Hi,
I want to use pjsip for an android VoIP application.
I am using native functions to call libpjsua2.so methods. libpjsua2 was
obtained in the way described in Getting-Started/Android: first building
all pj* folders to obtain libpj*.a, and then running /pjsip-apps/src/swig/make
to build libpjsua2 and swig bindings (which I don't use anyway).
I am unable to get any log message through LogCat. I am working with
Android Studio 1.5, gradle experimental 0.2.0.
In the android documentation, under "Debugging native code with Eclipse",
it is advised to use the compiler flag CFLAGS += -g (for example by adding
it to user.mak when building static libraries).
I have followed that point, but I think it is even not necessary, since in
the output of ./configure-android says CFLAGS = -fpic -ffunction-sections
-funwind-tables -no-canonical-prefixes -march=armv7-a -mfpu=vfpv3-d16
-mfloat-abi=softfp -mthumb -Os -g (...) by default.
I think that I'm having some kind of issue with libs compilation that does
not configure logs properly, but I could not find any further
documentation.
Thank you for your attention.
Best,
Andrés
--
*\A/*
SK
Shaul Kedem
Tue, Feb 16, 2016 2:14 PM
What do you put in pjsua_logging_config ? do you pass it on to init ?
On 16 Feb 2016, at 4:00 PM, Andres Perez anpelo6@gmail.com wrote:
Hi,
I want to use pjsip for an android VoIP application.
I am using native functions to call libpjsua2.so methods. libpjsua2 was obtained in the way described in Getting-Started/Android: first building all pj* folders to obtain libpj*.a, and then running /pjsip-apps/src/swig/make to build libpjsua2 and swig bindings (which I don't use anyway).
I am unable to get any log message through LogCat. I am working with Android Studio 1.5, gradle experimental 0.2.0.
In the android documentation, under "Debugging native code with Eclipse", it is advised to use the compiler flag CFLAGS += -g (for example by adding it to user.mak when building static libraries).
I have followed that point, but I think it is even not necessary, since in the output of ./configure-android says CFLAGS = -fpic -ffunction-sections -funwind-tables -no-canonical-prefixes -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=softfp -mthumb -Os -g (...) by default.
I think that I'm having some kind of issue with libs compilation that does not configure logs properly, but I could not find any further documentation.
Thank you for your attention.
Best,
Andrés
--
\A/
Visit our blog: http://blog.pjsip.org
pjsip mailing list
pjsip@lists.pjsip.org
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
What do you put in pjsua_logging_config ? do you pass it on to init ?
> On 16 Feb 2016, at 4:00 PM, Andres Perez <anpelo6@gmail.com> wrote:
>
> Hi,
>
> I want to use pjsip for an android VoIP application.
> I am using native functions to call libpjsua2.so methods. libpjsua2 was obtained in the way described in Getting-Started/Android: first building all pj* folders to obtain libpj*.a, and then running /pjsip-apps/src/swig/make to build libpjsua2 and swig bindings (which I don't use anyway).
>
> I am unable to get any log message through LogCat. I am working with Android Studio 1.5, gradle experimental 0.2.0.
>
> In the android documentation, under "Debugging native code with Eclipse", it is advised to use the compiler flag CFLAGS += -g (for example by adding it to user.mak when building static libraries).
> I have followed that point, but I think it is even not necessary, since in the output of ./configure-android says CFLAGS = -fpic -ffunction-sections -funwind-tables -no-canonical-prefixes -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=softfp -mthumb -Os -g (...) by default.
>
> I think that I'm having some kind of issue with libs compilation that does not configure logs properly, but I could not find any further documentation.
>
> Thank you for your attention.
>
> Best,
>
> Andrés
>
> --
> \A/
> _______________________________________________
> Visit our blog: http://blog.pjsip.org
>
> pjsip mailing list
> pjsip@lists.pjsip.org
> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
AP
Andres Perez
Tue, Feb 16, 2016 3:33 PM
What do you put in pjsua_logging_config ? do you pass it on to init ?
I am not using plain pjsip libraries, but pjsua2 abstraction.
In that sense, my init configuration code is like following.
try {
EpConfig *ep_cfg;
ep_cfg = new EpConfig();
ep_cfg->logConfig.msgLogging=1;
ep_cfg->logConfig.consoleLevel=5;
ep_cfg->logConfig.level = 5;
// ep_cfg->logConfig.filename = "THE.LOG"; // this line makes app
to crash, probably because of write permissions
ep->libInit(*ep_cfg);
} catch(Error& err) {
// ...
}
which is similar to the examples given, e.g. in
pjsip-apps/src/samples/pjsua2_demp.cpp
On 16 Feb 2016, at 4:00 PM, Andres Perez anpelo6@gmail.com wrote:
Hi,
I want to use pjsip for an android VoIP application.
I am using native functions to call libpjsua2.so methods. libpjsua2 was
obtained in the way described in Getting-Started/Android: first building
all pj* folders to obtain libpj*.a, and then running /pjsip-apps/src/swig/make
to build libpjsua2 and swig bindings (which I don't use anyway).
I am unable to get any log message through LogCat. I am working with
Android Studio 1.5, gradle experimental 0.2.0.
In the android documentation, under "Debugging native code with Eclipse",
it is advised to use the compiler flag CFLAGS += -g (for example by
adding it to user.mak when building static libraries).
I have followed that point, but I think it is even not necessary, since in
the output of ./configure-android says CFLAGS = -fpic
-ffunction-sections -funwind-tables -no-canonical-prefixes -march=armv7-a
-mfpu=vfpv3-d16 -mfloat-abi=softfp -mthumb -Os -g (...) by default.
I think that I'm having some kind of issue with libs compilation that does
not configure logs properly, but I could not find any further
documentation.
Thank you for your attention.
Best,
Andrés
--
\A/
Visit our blog: http://blog.pjsip.org
pjsip mailing list
pjsip@lists.pjsip.org
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
Visit our blog: http://blog.pjsip.org
pjsip mailing list
pjsip@lists.pjsip.org
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
2016-02-16 15:14 GMT+01:00 Shaul Kedem <shaul@yallo.com>:
> What do you put in pjsua_logging_config ? do you pass it on to init ?
>
> I am not using plain pjsip libraries, but pjsua2 abstraction.
In that sense, my init configuration code is like following.
try {
EpConfig *ep_cfg;
ep_cfg = new EpConfig();
ep_cfg->logConfig.msgLogging=1;
ep_cfg->logConfig.consoleLevel=5;
ep_cfg->logConfig.level = 5;
// ep_cfg->logConfig.filename = "THE.LOG"; // this line makes app
to crash, probably because of write permissions
ep->libInit(*ep_cfg);
} catch(Error& err) {
// ...
}
which is similar to the examples given, e.g. in
pjsip-apps/src/samples/pjsua2_demp.cpp
> On 16 Feb 2016, at 4:00 PM, Andres Perez <anpelo6@gmail.com> wrote:
>
> Hi,
>
> I want to use pjsip for an android VoIP application.
> I am using native functions to call libpjsua2.so methods. libpjsua2 was
> obtained in the way described in Getting-Started/Android: first building
> all pj* folders to obtain libpj*.a, and then running /pjsip-apps/src/swig/make
> to build libpjsua2 and swig bindings (which I don't use anyway).
>
> I am unable to get any log message through LogCat. I am working with
> Android Studio 1.5, gradle experimental 0.2.0.
>
> In the android documentation, under "Debugging native code with Eclipse",
> it is advised to use the compiler flag CFLAGS += -g (for example by
> adding it to user.mak when building static libraries).
> I have followed that point, but I think it is even not necessary, since in
> the output of ./configure-android says CFLAGS = -fpic
> -ffunction-sections -funwind-tables -no-canonical-prefixes -march=armv7-a
> -mfpu=vfpv3-d16 -mfloat-abi=softfp -mthumb -Os -g (...) by default.
>
> I think that I'm having some kind of issue with libs compilation that does
> not configure logs properly, but I could not find any further
> documentation.
>
> Thank you for your attention.
>
> Best,
>
> Andrés
>
> --
> *\A/*
> _______________________________________________
> Visit our blog: http://blog.pjsip.org
>
> pjsip mailing list
> pjsip@lists.pjsip.org
> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
>
>
>
> _______________________________________________
> Visit our blog: http://blog.pjsip.org
>
> pjsip mailing list
> pjsip@lists.pjsip.org
> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
>
>
--
*\A/*
SK
Shaul Kedem
Wed, Feb 17, 2016 7:21 AM
try writing to /sdcard/ on android
On 16 Feb 2016, at 5:33 PM, Andres Perez anpelo6@gmail.com wrote:
2016-02-16 15:14 GMT+01:00 Shaul Kedem <shaul@yallo.com mailto:shaul@yallo.com>:
What do you put in pjsua_logging_config ? do you pass it on to init ?
I am not using plain pjsip libraries, but pjsua2 abstraction.
In that sense, my init configuration code is like following.
try {
EpConfig *ep_cfg;
ep_cfg = new EpConfig();
ep_cfg->logConfig.msgLogging=1;
ep_cfg->logConfig.consoleLevel=5;
ep_cfg->logConfig.level = 5;
// ep_cfg->logConfig.filename = "THE.LOG"; // this line makes app to crash, probably because of write permissions
ep->libInit(*ep_cfg);
} catch(Error& err) {
// ...
}
which is similar to the examples given, e.g. in pjsip-apps/src/samples/pjsua2_demp.cpp
On 16 Feb 2016, at 4:00 PM, Andres Perez <anpelo6@gmail.com mailto:anpelo6@gmail.com> wrote:
Hi,
I want to use pjsip for an android VoIP application.
I am using native functions to call libpjsua2.so methods. libpjsua2 was obtained in the way described in Getting-Started/Android: first building all pj* folders to obtain libpj*.a, and then running /pjsip-apps/src/swig/make to build libpjsua2 and swig bindings (which I don't use anyway).
I am unable to get any log message through LogCat. I am working with Android Studio 1.5, gradle experimental 0.2.0.
In the android documentation, under "Debugging native code with Eclipse", it is advised to use the compiler flag CFLAGS += -g (for example by adding it to user.mak when building static libraries).
I have followed that point, but I think it is even not necessary, since in the output of ./configure-android says CFLAGS = -fpic -ffunction-sections -funwind-tables -no-canonical-prefixes -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=softfp -mthumb -Os -g (...) by default.
I think that I'm having some kind of issue with libs compilation that does not configure logs properly, but I could not find any further documentation.
Thank you for your attention.
Best,
Andrés
--
\A/
Visit our blog: http://blog.pjsip.org http://blog.pjsip.org/
pjsip mailing list
pjsip@lists.pjsip.org mailto:pjsip@lists.pjsip.org
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
try writing to /sdcard/ on android
> On 16 Feb 2016, at 5:33 PM, Andres Perez <anpelo6@gmail.com> wrote:
>
>
> 2016-02-16 15:14 GMT+01:00 Shaul Kedem <shaul@yallo.com <mailto:shaul@yallo.com>>:
> What do you put in pjsua_logging_config ? do you pass it on to init ?
>
> I am not using plain pjsip libraries, but pjsua2 abstraction.
> In that sense, my init configuration code is like following.
> try {
> EpConfig *ep_cfg;
> ep_cfg = new EpConfig();
>
> ep_cfg->logConfig.msgLogging=1;
> ep_cfg->logConfig.consoleLevel=5;
> ep_cfg->logConfig.level = 5;
> // ep_cfg->logConfig.filename = "THE.LOG"; // this line makes app to crash, probably because of write permissions
> ep->libInit(*ep_cfg);
> } catch(Error& err) {
> // ...
> }
> which is similar to the examples given, e.g. in pjsip-apps/src/samples/pjsua2_demp.cpp
>
>
>> On 16 Feb 2016, at 4:00 PM, Andres Perez <anpelo6@gmail.com <mailto:anpelo6@gmail.com>> wrote:
>>
>> Hi,
>>
>> I want to use pjsip for an android VoIP application.
>> I am using native functions to call libpjsua2.so methods. libpjsua2 was obtained in the way described in Getting-Started/Android: first building all pj* folders to obtain libpj*.a, and then running /pjsip-apps/src/swig/make to build libpjsua2 and swig bindings (which I don't use anyway).
>>
>> I am unable to get any log message through LogCat. I am working with Android Studio 1.5, gradle experimental 0.2.0.
>>
>> In the android documentation, under "Debugging native code with Eclipse", it is advised to use the compiler flag CFLAGS += -g (for example by adding it to user.mak when building static libraries).
>> I have followed that point, but I think it is even not necessary, since in the output of ./configure-android says CFLAGS = -fpic -ffunction-sections -funwind-tables -no-canonical-prefixes -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=softfp -mthumb -Os -g (...) by default.
>>
>> I think that I'm having some kind of issue with libs compilation that does not configure logs properly, but I could not find any further documentation.
>>
>> Thank you for your attention.
>>
>> Best,
>>
>> Andrés
>>
>> --
>> \A/
>> _______________________________________________
>> Visit our blog: http://blog.pjsip.org <http://blog.pjsip.org/>
>>
>> pjsip mailing list
>> pjsip@lists.pjsip.org <mailto:pjsip@lists.pjsip.org>
>> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org <http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org>
>
>
> _______________________________________________
> Visit our blog: http://blog.pjsip.org <http://blog.pjsip.org/>
>
> pjsip mailing list
> pjsip@lists.pjsip.org <mailto:pjsip@lists.pjsip.org>
> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org <http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org>
>
>
>
>
> --
> \A/
> _______________________________________________
> Visit our blog: http://blog.pjsip.org <http://blog.pjsip.org/>
>
> pjsip mailing list
> pjsip@lists.pjsip.org <mailto:pjsip@lists.pjsip.org>
> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org <http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org>
AP
Andres Perez
Wed, Feb 17, 2016 9:59 AM
try writing to /sdcard/ on android
Thanks! following code works (although not in every device, not sure why)
ep_cfg->logConfig.filename = "/sdcard/logconfig";
However, having a log file is nice, but I still would not be able to get
log messages through LogCat, which was my main question.
Do you have maybe any further suggestions?
Thanks,
Andrés
What do you put in pjsua_logging_config ? do you pass it on to init ?
I am not using plain pjsip libraries, but pjsua2 abstraction.
In that sense, my init configuration code is like following.
try {
EpConfig *ep_cfg;
ep_cfg = new EpConfig();
ep_cfg->logConfig.msgLogging=1;
ep_cfg->logConfig.consoleLevel=5;
ep_cfg->logConfig.level = 5;
// ep_cfg->logConfig.filename = "THE.LOG"; // this line makes app to crash, probably because of write permissions
ep->libInit(*ep_cfg);
} catch(Error& err) {
// ...
}
which is similar to the examples given, e.g. in
pjsip-apps/src/samples/pjsua2_demp.cpp
On 16 Feb 2016, at 4:00 PM, Andres Perez anpelo6@gmail.com wrote:
Hi,
I want to use pjsip for an android VoIP application.
I am using native functions to call libpjsua2.so methods. libpjsua2 was
obtained in the way described in Getting-Started/Android: first building
all pj* folders to obtain libpj*.a, and then running /pjsip-apps/src/swig/make
to build libpjsua2 and swig bindings (which I don't use anyway).
I am unable to get any log message through LogCat. I am working with
Android Studio 1.5, gradle experimental 0.2.0.
In the android documentation, under "Debugging native code with Eclipse",
it is advised to use the compiler flag CFLAGS += -g (for example by
adding it to user.mak when building static libraries).
I have followed that point, but I think it is even not necessary, since
in the output of ./configure-android says CFLAGS = -fpic
-ffunction-sections -funwind-tables -no-canonical-prefixes -march=armv7-a
-mfpu=vfpv3-d16 -mfloat-abi=softfp -mthumb -Os -g (...) by default.
I think that I'm having some kind of issue with libs compilation that
does not configure logs properly, but I could not find any further
documentation.
Thank you for your attention.
Best,
Andrés
--
\A/
Visit our blog: http://blog.pjsip.org
pjsip mailing list
pjsip@lists.pjsip.org
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
Visit our blog: http://blog.pjsip.org
pjsip mailing list
pjsip@lists.pjsip.org
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
2016-02-17 8:21 GMT+01:00 Shaul Kedem <shaul@yallo.com>:
> try writing to /sdcard/ on android
>
> Thanks! following code works (although not in every device, not sure why)
ep_cfg->logConfig.filename = "/sdcard/logconfig";
However, having a log file is nice, but I still would not be able to get
log messages through LogCat, which was my main question.
Do you have maybe any further suggestions?
Thanks,
Andrés
> On 16 Feb 2016, at 5:33 PM, Andres Perez <anpelo6@gmail.com> wrote:
>
>
> 2016-02-16 15:14 GMT+01:00 Shaul Kedem <shaul@yallo.com>:
>
>> What do you put in pjsua_logging_config ? do you pass it on to init ?
>>
>> I am not using plain pjsip libraries, but pjsua2 abstraction.
> In that sense, my init configuration code is like following.
>
> try {
> EpConfig *ep_cfg;
> ep_cfg = new EpConfig();
>
> ep_cfg->logConfig.msgLogging=1;
> ep_cfg->logConfig.consoleLevel=5;
> ep_cfg->logConfig.level = 5;
> // ep_cfg->logConfig.filename = "THE.LOG"; // this line makes app to crash, probably because of write permissions
> ep->libInit(*ep_cfg);
> } catch(Error& err) {
> // ...
> }
>
> which is similar to the examples given, e.g. in
> pjsip-apps/src/samples/pjsua2_demp.cpp
>
>
>
>> On 16 Feb 2016, at 4:00 PM, Andres Perez <anpelo6@gmail.com> wrote:
>>
>> Hi,
>>
>> I want to use pjsip for an android VoIP application.
>> I am using native functions to call libpjsua2.so methods. libpjsua2 was
>> obtained in the way described in Getting-Started/Android: first building
>> all pj* folders to obtain libpj*.a, and then running /pjsip-apps/src/swig/make
>> to build libpjsua2 and swig bindings (which I don't use anyway).
>>
>> I am unable to get any log message through LogCat. I am working with
>> Android Studio 1.5, gradle experimental 0.2.0.
>>
>> In the android documentation, under "Debugging native code with Eclipse",
>> it is advised to use the compiler flag CFLAGS += -g (for example by
>> adding it to user.mak when building static libraries).
>> I have followed that point, but I think it is even not necessary, since
>> in the output of ./configure-android says CFLAGS = -fpic
>> -ffunction-sections -funwind-tables -no-canonical-prefixes -march=armv7-a
>> -mfpu=vfpv3-d16 -mfloat-abi=softfp -mthumb -Os -g (...) by default.
>>
>> I think that I'm having some kind of issue with libs compilation that
>> does not configure logs properly, but I could not find any further
>> documentation.
>>
>> Thank you for your attention.
>>
>> Best,
>>
>> Andrés
>>
>> --
>> *\A/*
>> _______________________________________________
>> Visit our blog: http://blog.pjsip.org
>>
>> pjsip mailing list
>> pjsip@lists.pjsip.org
>> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
>>
>>
>>
>> _______________________________________________
>> Visit our blog: http://blog.pjsip.org
>>
>> pjsip mailing list
>> pjsip@lists.pjsip.org
>> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
>>
>>
>
>
> --
> *\A/*
> _______________________________________________
> Visit our blog: http://blog.pjsip.org
>
> pjsip mailing list
> pjsip@lists.pjsip.org
> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
>
>
>
> _______________________________________________
> Visit our blog: http://blog.pjsip.org
>
> pjsip mailing list
> pjsip@lists.pjsip.org
> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
>
>
--
*\A/*
AP
Andres Perez
Thu, Feb 18, 2016 9:44 AM
I finally solved the question.
The way to do it is to override LogWriter class and implement custom
behavior on the write method.
Then you specify EpConfig->LogConfig to use your new writer instead of the
default writer.
Andrés
2016-02-17 10:59 GMT+01:00 Andres Perez anpelo6@gmail.com:
try writing to /sdcard/ on android
Thanks! following code works (although not in every device, not sure why)
ep_cfg->logConfig.filename = "/sdcard/logconfig";
However, having a log file is nice, but I still would not be able to get
log messages through LogCat, which was my main question.
Do you have maybe any further suggestions?
Thanks,
Andrés
What do you put in pjsua_logging_config ? do you pass it on to init ?
I am not using plain pjsip libraries, but pjsua2 abstraction.
In that sense, my init configuration code is like following.
try {
EpConfig *ep_cfg;
ep_cfg = new EpConfig();
ep_cfg->logConfig.msgLogging=1;
ep_cfg->logConfig.consoleLevel=5;
ep_cfg->logConfig.level = 5;
// ep_cfg->logConfig.filename = "THE.LOG"; // this line makes app to crash, probably because of write permissions
ep->libInit(*ep_cfg);
} catch(Error& err) {
// ...
}
which is similar to the examples given, e.g. in
pjsip-apps/src/samples/pjsua2_demp.cpp
On 16 Feb 2016, at 4:00 PM, Andres Perez anpelo6@gmail.com wrote:
Hi,
I want to use pjsip for an android VoIP application.
I am using native functions to call libpjsua2.so methods. libpjsua2 was
obtained in the way described in Getting-Started/Android: first building
all pj* folders to obtain libpj*.a, and then running /pjsip-apps/src/swig/make
to build libpjsua2 and swig bindings (which I don't use anyway).
I am unable to get any log message through LogCat. I am working with
Android Studio 1.5, gradle experimental 0.2.0.
In the android documentation, under "Debugging native code with
Eclipse", it is advised to use the compiler flag CFLAGS += -g (for
example by adding it to user.mak when building static libraries).
I have followed that point, but I think it is even not necessary, since
in the output of ./configure-android says CFLAGS = -fpic
-ffunction-sections -funwind-tables -no-canonical-prefixes -march=armv7-a
-mfpu=vfpv3-d16 -mfloat-abi=softfp -mthumb -Os -g (...) by default.
I think that I'm having some kind of issue with libs compilation that
does not configure logs properly, but I could not find any further
documentation.
Thank you for your attention.
Best,
Andrés
--
\A/
Visit our blog: http://blog.pjsip.org
pjsip mailing list
pjsip@lists.pjsip.org
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
Visit our blog: http://blog.pjsip.org
pjsip mailing list
pjsip@lists.pjsip.org
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
I finally solved the question.
The way to do it is to override LogWriter class and implement custom
behavior on the write method.
Then you specify EpConfig->LogConfig to use your new writer instead of the
default writer.
Andrés
2016-02-17 10:59 GMT+01:00 Andres Perez <anpelo6@gmail.com>:
>
>
> 2016-02-17 8:21 GMT+01:00 Shaul Kedem <shaul@yallo.com>:
>
>> try writing to /sdcard/ on android
>>
>> Thanks! following code works (although not in every device, not sure why)
>
> ep_cfg->logConfig.filename = "/sdcard/logconfig";
>
>
> However, having a log file is nice, but I still would not be able to get
> log messages through LogCat, which was my main question.
>
> Do you have maybe any further suggestions?
>
> Thanks,
>
> Andrés
>
>
>> On 16 Feb 2016, at 5:33 PM, Andres Perez <anpelo6@gmail.com> wrote:
>>
>>
>> 2016-02-16 15:14 GMT+01:00 Shaul Kedem <shaul@yallo.com>:
>>
>>> What do you put in pjsua_logging_config ? do you pass it on to init ?
>>>
>>> I am not using plain pjsip libraries, but pjsua2 abstraction.
>> In that sense, my init configuration code is like following.
>>
>> try {
>> EpConfig *ep_cfg;
>> ep_cfg = new EpConfig();
>>
>> ep_cfg->logConfig.msgLogging=1;
>> ep_cfg->logConfig.consoleLevel=5;
>> ep_cfg->logConfig.level = 5;
>> // ep_cfg->logConfig.filename = "THE.LOG"; // this line makes app to crash, probably because of write permissions
>> ep->libInit(*ep_cfg);
>> } catch(Error& err) {
>> // ...
>> }
>>
>> which is similar to the examples given, e.g. in
>> pjsip-apps/src/samples/pjsua2_demp.cpp
>>
>>
>>
>>> On 16 Feb 2016, at 4:00 PM, Andres Perez <anpelo6@gmail.com> wrote:
>>>
>>> Hi,
>>>
>>> I want to use pjsip for an android VoIP application.
>>> I am using native functions to call libpjsua2.so methods. libpjsua2 was
>>> obtained in the way described in Getting-Started/Android: first building
>>> all pj* folders to obtain libpj*.a, and then running /pjsip-apps/src/swig/make
>>> to build libpjsua2 and swig bindings (which I don't use anyway).
>>>
>>> I am unable to get any log message through LogCat. I am working with
>>> Android Studio 1.5, gradle experimental 0.2.0.
>>>
>>> In the android documentation, under "Debugging native code with
>>> Eclipse", it is advised to use the compiler flag CFLAGS += -g (for
>>> example by adding it to user.mak when building static libraries).
>>> I have followed that point, but I think it is even not necessary, since
>>> in the output of ./configure-android says CFLAGS = -fpic
>>> -ffunction-sections -funwind-tables -no-canonical-prefixes -march=armv7-a
>>> -mfpu=vfpv3-d16 -mfloat-abi=softfp -mthumb -Os -g (...) by default.
>>>
>>> I think that I'm having some kind of issue with libs compilation that
>>> does not configure logs properly, but I could not find any further
>>> documentation.
>>>
>>> Thank you for your attention.
>>>
>>> Best,
>>>
>>> Andrés
>>>
>>> --
>>> *\A/*
>>> _______________________________________________
>>> Visit our blog: http://blog.pjsip.org
>>>
>>> pjsip mailing list
>>> pjsip@lists.pjsip.org
>>> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
>>>
>>>
>>>
>>> _______________________________________________
>>> Visit our blog: http://blog.pjsip.org
>>>
>>> pjsip mailing list
>>> pjsip@lists.pjsip.org
>>> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
>>>
>>>
>>
>>
>> --
>> *\A/*
>> _______________________________________________
>> Visit our blog: http://blog.pjsip.org
>>
>> pjsip mailing list
>> pjsip@lists.pjsip.org
>> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
>>
>>
>>
>> _______________________________________________
>> Visit our blog: http://blog.pjsip.org
>>
>> pjsip mailing list
>> pjsip@lists.pjsip.org
>> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
>>
>>
>
>
> --
> *\A/*
>
--
*\A/*
DP
deepak Padhy
Thu, Feb 18, 2016 11:30 AM
Thanks for sharing the info , its really helpful as i am also stuck for
getting the android logs through logcat.
Can you please share the piece of code or some more information about how i
can override the default Logwriter.
I followed the procedure shared in previous mails, bt i only can see very
few pjsip stack logs even if the log level set is 6.
Please share some suggestion.
On 18 Feb 2016 15:15, "Andres Perez" anpelo6@gmail.com wrote:
I finally solved the question.
The way to do it is to override LogWriter class and implement custom
behavior on the write method.
Then you specify EpConfig->LogConfig to use your new writer instead of the
default writer.
Andrés
2016-02-17 10:59 GMT+01:00 Andres Perez anpelo6@gmail.com:
try writing to /sdcard/ on android
Thanks! following code works (although not in every device, not sure why)
ep_cfg->logConfig.filename = "/sdcard/logconfig";
However, having a log file is nice, but I still would not be able to get
log messages through LogCat, which was my main question.
Do you have maybe any further suggestions?
Thanks,
Andrés
What do you put in pjsua_logging_config ? do you pass it on to init ?
I am not using plain pjsip libraries, but pjsua2 abstraction.
In that sense, my init configuration code is like following.
try {
EpConfig *ep_cfg;
ep_cfg = new EpConfig();
ep_cfg->logConfig.msgLogging=1;
ep_cfg->logConfig.consoleLevel=5;
ep_cfg->logConfig.level = 5;
// ep_cfg->logConfig.filename = "THE.LOG"; // this line makes app to crash, probably because of write permissions
ep->libInit(*ep_cfg);
} catch(Error& err) {
// ...
}
which is similar to the examples given, e.g. in
pjsip-apps/src/samples/pjsua2_demp.cpp
On 16 Feb 2016, at 4:00 PM, Andres Perez anpelo6@gmail.com wrote:
Hi,
I want to use pjsip for an android VoIP application.
I am using native functions to call libpjsua2.so methods. libpjsua2 was
obtained in the way described in Getting-Started/Android: first building
all pj* folders to obtain libpj*.a, and then running /pjsip-apps/src/swig/make
to build libpjsua2 and swig bindings (which I don't use anyway).
I am unable to get any log message through LogCat. I am working with
Android Studio 1.5, gradle experimental 0.2.0.
In the android documentation, under "Debugging native code with
Eclipse", it is advised to use the compiler flag CFLAGS += -g (for
example by adding it to user.mak when building static libraries).
I have followed that point, but I think it is even not necessary, since
in the output of ./configure-android says CFLAGS = -fpic
-ffunction-sections -funwind-tables -no-canonical-prefixes -march=armv7-a
-mfpu=vfpv3-d16 -mfloat-abi=softfp -mthumb -Os -g (...) by default.
I think that I'm having some kind of issue with libs compilation that
does not configure logs properly, but I could not find any further
documentation.
Thank you for your attention.
Best,
Andrés
--
\A/
Visit our blog: http://blog.pjsip.org
pjsip mailing list
pjsip@lists.pjsip.org
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
Visit our blog: http://blog.pjsip.org
pjsip mailing list
pjsip@lists.pjsip.org
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
Thanks for sharing the info , its really helpful as i am also stuck for
getting the android logs through logcat.
Can you please share the piece of code or some more information about how i
can override the default Logwriter.
I followed the procedure shared in previous mails, bt i only can see very
few pjsip stack logs even if the log level set is 6.
Please share some suggestion.
On 18 Feb 2016 15:15, "Andres Perez" <anpelo6@gmail.com> wrote:
> I finally solved the question.
> The way to do it is to override LogWriter class and implement custom
> behavior on the write method.
> Then you specify EpConfig->LogConfig to use your new writer instead of the
> default writer.
>
> Andrés
>
> 2016-02-17 10:59 GMT+01:00 Andres Perez <anpelo6@gmail.com>:
>
>>
>>
>> 2016-02-17 8:21 GMT+01:00 Shaul Kedem <shaul@yallo.com>:
>>
>>> try writing to /sdcard/ on android
>>>
>>> Thanks! following code works (although not in every device, not sure why)
>>
>> ep_cfg->logConfig.filename = "/sdcard/logconfig";
>>
>>
>> However, having a log file is nice, but I still would not be able to get
>> log messages through LogCat, which was my main question.
>>
>> Do you have maybe any further suggestions?
>>
>> Thanks,
>>
>> Andrés
>>
>>
>>> On 16 Feb 2016, at 5:33 PM, Andres Perez <anpelo6@gmail.com> wrote:
>>>
>>>
>>> 2016-02-16 15:14 GMT+01:00 Shaul Kedem <shaul@yallo.com>:
>>>
>>>> What do you put in pjsua_logging_config ? do you pass it on to init ?
>>>>
>>>> I am not using plain pjsip libraries, but pjsua2 abstraction.
>>> In that sense, my init configuration code is like following.
>>>
>>> try {
>>> EpConfig *ep_cfg;
>>> ep_cfg = new EpConfig();
>>>
>>> ep_cfg->logConfig.msgLogging=1;
>>> ep_cfg->logConfig.consoleLevel=5;
>>> ep_cfg->logConfig.level = 5;
>>> // ep_cfg->logConfig.filename = "THE.LOG"; // this line makes app to crash, probably because of write permissions
>>> ep->libInit(*ep_cfg);
>>> } catch(Error& err) {
>>> // ...
>>> }
>>>
>>> which is similar to the examples given, e.g. in
>>> pjsip-apps/src/samples/pjsua2_demp.cpp
>>>
>>>
>>>
>>>> On 16 Feb 2016, at 4:00 PM, Andres Perez <anpelo6@gmail.com> wrote:
>>>>
>>>> Hi,
>>>>
>>>> I want to use pjsip for an android VoIP application.
>>>> I am using native functions to call libpjsua2.so methods. libpjsua2 was
>>>> obtained in the way described in Getting-Started/Android: first building
>>>> all pj* folders to obtain libpj*.a, and then running /pjsip-apps/src/swig/make
>>>> to build libpjsua2 and swig bindings (which I don't use anyway).
>>>>
>>>> I am unable to get any log message through LogCat. I am working with
>>>> Android Studio 1.5, gradle experimental 0.2.0.
>>>>
>>>> In the android documentation, under "Debugging native code with
>>>> Eclipse", it is advised to use the compiler flag CFLAGS += -g (for
>>>> example by adding it to user.mak when building static libraries).
>>>> I have followed that point, but I think it is even not necessary, since
>>>> in the output of ./configure-android says CFLAGS = -fpic
>>>> -ffunction-sections -funwind-tables -no-canonical-prefixes -march=armv7-a
>>>> -mfpu=vfpv3-d16 -mfloat-abi=softfp -mthumb -Os -g (...) by default.
>>>>
>>>> I think that I'm having some kind of issue with libs compilation that
>>>> does not configure logs properly, but I could not find any further
>>>> documentation.
>>>>
>>>> Thank you for your attention.
>>>>
>>>> Best,
>>>>
>>>> Andrés
>>>>
>>>> --
>>>> *\A/*
>>>> _______________________________________________
>>>> Visit our blog: http://blog.pjsip.org
>>>>
>>>> pjsip mailing list
>>>> pjsip@lists.pjsip.org
>>>> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> Visit our blog: http://blog.pjsip.org
>>>>
>>>> pjsip mailing list
>>>> pjsip@lists.pjsip.org
>>>> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
>>>>
>>>>
>>>
>>>
>>> --
>>> *\A/*
>>> _______________________________________________
>>> Visit our blog: http://blog.pjsip.org
>>>
>>> pjsip mailing list
>>> pjsip@lists.pjsip.org
>>> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
>>>
>>>
>>>
>>> _______________________________________________
>>> Visit our blog: http://blog.pjsip.org
>>>
>>> pjsip mailing list
>>> pjsip@lists.pjsip.org
>>> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
>>>
>>>
>>
>>
>> --
>> *\A/*
>>
>
>
>
> --
> *\A/*
>
> _______________________________________________
> Visit our blog: http://blog.pjsip.org
>
> pjsip mailing list
> pjsip@lists.pjsip.org
> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
>
>
AP
Andres Perez
Thu, Feb 18, 2016 11:44 AM
Here you go:
EpConfig *ep_cfg = new EpConfig();
// do stuff
// use custom writer
ep_cfg->logConfig.writer = new CustomLogWriter(this);
And then in CustomLogWriter (which of course inhereits from LogWriter)
you must implement the write function to add the desired behavior:
void CustomLogWriter::write(const LogEntry &entry) {
// do the stuff you want
entry.level;
entry.msg;
entry.threadId;
entry.threadName;
}
(Please note that this is C++ implementation, but Java/Python
implementations should be equivalent)
2016-02-18 12:30 GMT+01:00 deepak Padhy dpkpadhy6@gmail.com:
Thanks for sharing the info , its really helpful as i am also stuck for
getting the android logs through logcat.
Can you please share the piece of code or some more information about how
i can override the default Logwriter.
I followed the procedure shared in previous mails, bt i only can see very
few pjsip stack logs even if the log level set is 6.
Please share some suggestion.
On 18 Feb 2016 15:15, "Andres Perez" anpelo6@gmail.com wrote:
I finally solved the question.
The way to do it is to override LogWriter class and implement custom
behavior on the write method.
Then you specify EpConfig->LogConfig to use your new writer instead of
the default writer.
Andrés
2016-02-17 10:59 GMT+01:00 Andres Perez anpelo6@gmail.com:
try writing to /sdcard/ on android
Thanks! following code works (although not in every device, not sure
why)
ep_cfg->logConfig.filename = "/sdcard/logconfig";
However, having a log file is nice, but I still would not be able to get
log messages through LogCat, which was my main question.
Do you have maybe any further suggestions?
Thanks,
Andrés
What do you put in pjsua_logging_config ? do you pass it on to init ?
I am not using plain pjsip libraries, but pjsua2 abstraction.
In that sense, my init configuration code is like following.
try {
EpConfig *ep_cfg;
ep_cfg = new EpConfig();
ep_cfg->logConfig.msgLogging=1;
ep_cfg->logConfig.consoleLevel=5;
ep_cfg->logConfig.level = 5;
// ep_cfg->logConfig.filename = "THE.LOG"; // this line makes app to crash, probably because of write permissions
ep->libInit(*ep_cfg);
} catch(Error& err) {
// ...
}
which is similar to the examples given, e.g. in
pjsip-apps/src/samples/pjsua2_demp.cpp
On 16 Feb 2016, at 4:00 PM, Andres Perez anpelo6@gmail.com wrote:
Hi,
I want to use pjsip for an android VoIP application.
I am using native functions to call libpjsua2.so methods. libpjsua2
was obtained in the way described in Getting-Started/Android: first
building all pj* folders to obtain libpj*.a, and then running /pjsip-apps/src/swig/make
to build libpjsua2 and swig bindings (which I don't use anyway).
I am unable to get any log message through LogCat. I am working with
Android Studio 1.5, gradle experimental 0.2.0.
In the android documentation, under "Debugging native code with
Eclipse", it is advised to use the compiler flag CFLAGS += -g (for
example by adding it to user.mak when building static libraries).
I have followed that point, but I think it is even not necessary,
since in the output of ./configure-android says CFLAGS = -fpic
-ffunction-sections -funwind-tables -no-canonical-prefixes -march=armv7-a
-mfpu=vfpv3-d16 -mfloat-abi=softfp -mthumb -Os -g (...) by default.
I think that I'm having some kind of issue with libs compilation that
does not configure logs properly, but I could not find any further
documentation.
Thank you for your attention.
Best,
Andrés
--
\A/
Visit our blog: http://blog.pjsip.org
pjsip mailing list
pjsip@lists.pjsip.org
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
Visit our blog: http://blog.pjsip.org
pjsip mailing list
pjsip@lists.pjsip.org
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
Here you go:
EpConfig *ep_cfg = new EpConfig();
// do stuff
// use custom writer
ep_cfg->logConfig.writer = new CustomLogWriter(this);
And then in CustomLogWriter (which of course inhereits from LogWriter)
you must implement the write function to add the desired behavior:
void CustomLogWriter::write(const LogEntry &entry) {
// do the stuff you want
entry.level;
entry.msg;
entry.threadId;
entry.threadName;
}
(Please note that this is C++ implementation, but Java/Python
implementations should be equivalent)
2016-02-18 12:30 GMT+01:00 deepak Padhy <dpkpadhy6@gmail.com>:
> Thanks for sharing the info , its really helpful as i am also stuck for
> getting the android logs through logcat.
>
> Can you please share the piece of code or some more information about how
> i can override the default Logwriter.
>
> I followed the procedure shared in previous mails, bt i only can see very
> few pjsip stack logs even if the log level set is 6.
>
> Please share some suggestion.
> On 18 Feb 2016 15:15, "Andres Perez" <anpelo6@gmail.com> wrote:
>
>> I finally solved the question.
>> The way to do it is to override LogWriter class and implement custom
>> behavior on the write method.
>> Then you specify EpConfig->LogConfig to use your new writer instead of
>> the default writer.
>>
>> Andrés
>>
>> 2016-02-17 10:59 GMT+01:00 Andres Perez <anpelo6@gmail.com>:
>>
>>>
>>>
>>> 2016-02-17 8:21 GMT+01:00 Shaul Kedem <shaul@yallo.com>:
>>>
>>>> try writing to /sdcard/ on android
>>>>
>>>> Thanks! following code works (although not in every device, not sure
>>> why)
>>>
>>> ep_cfg->logConfig.filename = "/sdcard/logconfig";
>>>
>>>
>>> However, having a log file is nice, but I still would not be able to get
>>> log messages through LogCat, which was my main question.
>>>
>>> Do you have maybe any further suggestions?
>>>
>>> Thanks,
>>>
>>> Andrés
>>>
>>>
>>>> On 16 Feb 2016, at 5:33 PM, Andres Perez <anpelo6@gmail.com> wrote:
>>>>
>>>>
>>>> 2016-02-16 15:14 GMT+01:00 Shaul Kedem <shaul@yallo.com>:
>>>>
>>>>> What do you put in pjsua_logging_config ? do you pass it on to init ?
>>>>>
>>>>> I am not using plain pjsip libraries, but pjsua2 abstraction.
>>>> In that sense, my init configuration code is like following.
>>>>
>>>> try {
>>>> EpConfig *ep_cfg;
>>>> ep_cfg = new EpConfig();
>>>>
>>>> ep_cfg->logConfig.msgLogging=1;
>>>> ep_cfg->logConfig.consoleLevel=5;
>>>> ep_cfg->logConfig.level = 5;
>>>> // ep_cfg->logConfig.filename = "THE.LOG"; // this line makes app to crash, probably because of write permissions
>>>> ep->libInit(*ep_cfg);
>>>> } catch(Error& err) {
>>>> // ...
>>>> }
>>>>
>>>> which is similar to the examples given, e.g. in
>>>> pjsip-apps/src/samples/pjsua2_demp.cpp
>>>>
>>>>
>>>>
>>>>> On 16 Feb 2016, at 4:00 PM, Andres Perez <anpelo6@gmail.com> wrote:
>>>>>
>>>>> Hi,
>>>>>
>>>>> I want to use pjsip for an android VoIP application.
>>>>> I am using native functions to call libpjsua2.so methods. libpjsua2
>>>>> was obtained in the way described in Getting-Started/Android: first
>>>>> building all pj* folders to obtain libpj*.a, and then running /pjsip-apps/src/swig/make
>>>>> to build libpjsua2 and swig bindings (which I don't use anyway).
>>>>>
>>>>> I am unable to get any log message through LogCat. I am working with
>>>>> Android Studio 1.5, gradle experimental 0.2.0.
>>>>>
>>>>> In the android documentation, under "Debugging native code with
>>>>> Eclipse", it is advised to use the compiler flag CFLAGS += -g (for
>>>>> example by adding it to user.mak when building static libraries).
>>>>> I have followed that point, but I think it is even not necessary,
>>>>> since in the output of ./configure-android says CFLAGS = -fpic
>>>>> -ffunction-sections -funwind-tables -no-canonical-prefixes -march=armv7-a
>>>>> -mfpu=vfpv3-d16 -mfloat-abi=softfp -mthumb -Os -g (...) by default.
>>>>>
>>>>> I think that I'm having some kind of issue with libs compilation that
>>>>> does not configure logs properly, but I could not find any further
>>>>> documentation.
>>>>>
>>>>> Thank you for your attention.
>>>>>
>>>>> Best,
>>>>>
>>>>> Andrés
>>>>>
>>>>> --
>>>>> *\A/*
>>>>> _______________________________________________
>>>>> Visit our blog: http://blog.pjsip.org
>>>>>
>>>>> pjsip mailing list
>>>>> pjsip@lists.pjsip.org
>>>>> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Visit our blog: http://blog.pjsip.org
>>>>>
>>>>> pjsip mailing list
>>>>> pjsip@lists.pjsip.org
>>>>> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> *\A/*
>>>> _______________________________________________
>>>> Visit our blog: http://blog.pjsip.org
>>>>
>>>> pjsip mailing list
>>>> pjsip@lists.pjsip.org
>>>> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> Visit our blog: http://blog.pjsip.org
>>>>
>>>> pjsip mailing list
>>>> pjsip@lists.pjsip.org
>>>> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
>>>>
>>>>
>>>
>>>
>>> --
>>> *\A/*
>>>
>>
>>
>>
>> --
>> *\A/*
>>
>> _______________________________________________
>> Visit our blog: http://blog.pjsip.org
>>
>> pjsip mailing list
>> pjsip@lists.pjsip.org
>> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
>>
>>
> _______________________________________________
> Visit our blog: http://blog.pjsip.org
>
> pjsip mailing list
> pjsip@lists.pjsip.org
> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
>
>
--
*\A/*