Re: [sr-dev] [kamailio/kamailio] Kemi API xlog doesn't support log_facility configuration (#2064)

2019-09-12 Thread adil-mafzool
thanks @miconda 
Wanted this feature to be logged as when you are moving from native to the kemi 
system it become easier

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/2064#issuecomment-530878591___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] Kemi API xlog doesn't support log_facility configuration (#2064)

2019-09-11 Thread Daniel-Constantin Mierla
The xlog module is not exported to KEMI, probably it should be addressed to 
make those functions available to all scripting languages. Right now the basic 
logging functions are exported from core (e.g., KSR.xinfo() ).

For Python, you can try to use the function from their syslog package:

  * https://docs.python.org/3.3/library/syslog.html

Like:

```
syslog.syslog(LOG_INFO| LOG_LOCAL2, "this is a log info message\")
```

It should not be needed to do openlog() in Python script, kamailio does it 
internally.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/2064#issuecomment-530241378___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] [kamailio/kamailio] Kemi API xlog doesn't support log_facility configuration (#2064)

2019-09-10 Thread adil-mafzool


### Description



### Troubleshooting

kamailio native config: -
xlog("LOG_LOCAL2", "L_INFO", "REQUEST: 
transaction_id=$avp(tid);timestamp=$Ts;method=$rm;source_ip=$si;source_port=$sp;from_user=$fU;from_domain=$fd;to_user=$tU;to_domain=$td;request_user=$oU;request_domain=$od;");

python kemi config
 KSR.xlog.xlog( "LOG_LOCAL2", "L_INFO", "REQUEST: 
timestamp=$Ts;method=$rm;source_ip=$si;source_port=$sp;from_user=$fU;from_domain=$fd;to_user=$tU;to_domain=$td;request_user=$oU;request_domain=$od;")

produced following errors: -
ERROR: app_python [python_support.c:150]: python_handle_exception(): 
python_exec2: Unhandled exception in the Python code:#012TypeError: 
kemi-param-ss() takes exactly 2 arguments (3 given)

 Debugging Data



```
N-A
```

 Log Messages



```
N-A
```

 SIP Traffic



```
N-A
```

### Possible Solutions



### Additional Information

  * **Kamailio Version** - output of `kamailio -v`

```
version: kamailio 5.1.8 (x86_64/linux)
flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, 
DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC, Q_MALLOC, 
F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, 
USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144 MAX_URI_SIZE 1024, 
BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: unknown
compiled with gcc 6.3.0
```

Debian 9.5



```
Linux routing-proxy-01 4.9.0-3-amd64 #1 SMP Debian 4.9.30-2+deb9u5 (2017-09-19) 
x86_64 GNU/Linux
```


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/2064___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev