I am using Kamailio 4.0.3 and can't logs.
0(20266) DEBUG: <core> [cfg.y:1791]: yyparse(): loading module xlog.so
0(20266) DEBUG: <core> [sr_module.c:499]: load_module(): load_module: module file not found </usr/local/lib/kamailio/modules_k/xlog.so>
0(20266) DEBUG: <core> [sr_module.c:522]: load_module(): load_module: module file not found </usr/local/lib/kamailio/modules_k/xlog/xlog.so>
0(20266) DEBUG: <core> [sr_module.c:564]: load_module(): load_module: trying to load </usr/lib64/kamailio/modules/xlog.so>
0(20266) DEBUG: <core> [sr_module.c:343]: register_module(): register PV from: xlog
0(20266) DEBUG: <core> [sr_module.c:674]: find_mod_export_record(): find_export_record: found <xlog> in module xlog [/usr/lib64/kamailio/modules/xlog.so]
0(20266) DEBUG: <core> [sr_module.c:674]: find_mod_export_record(): find_export_record: found <xlog> in module xlog [/usr/lib64/kamailio/modules/xlog.so]
0(20266) DEBUG: <core> [sr_module.c:674]: find_mod_export_record(): find_export_record: found <xlog> in module xlog [/usr/lib64/kamailio/modules/xlog.so]
0(20266) DEBUG: <core> [sr_module.c:674]: find_mod_export_record(): find_export_record: found <xlog> in module xlog [/usr/lib64/kamailio/modules/xlog.so]
0(20266) DEBUG: <core> [sr_module.c:674]: find_mod_export_record(): find_export_record: found <xlog> in module xlog [/usr/lib64/kamailio/modules/xlog.so]
0(20266) DEBUG: <core> [sr_module.c:674]: find_mod_export_record(): find_export_record: found <xlog> in module xlog [/usr/lib64/kamailio/modules/xlog.so]
0(20266) DEBUG: <core> [sr_module.c:674]: find_mod_export_record(): find_export_record: found <xdbg> in module xlog [/usr/lib64/kamailio/modules/xlog.so]
0(20266) DEBUG: <core> [sr_module.c:674]: find_mod_export_record(): find_export_record: found <xdbg> in module xlog [/usr/lib64/kamailio/modules/xlog.so]
0(20268) DEBUG: <core> [sr_module.c:935]: init_mod(): DEBUG: init_mod: xlog
0(20268) DEBUG: <core> [route.c:928]: fix_actions(): fixing xlog()
0(20268) DEBUG: <core> [route.c:928]: fix_actions(): fixing xlog()
0(20268) DEBUG: <core> [route.c:928]: fix_actions(): fixing xlog()
0(20268) DEBUG: <core> [route.c:928]: fix_actions(): fixing xlog()
0(20268) DEBUG: <core> [route.c:928]: fix_actions(): fixing xlog()
0(20268) DEBUG: <core> [route.c:928]: fix_actions(): fixing xlog()
log("~~~~~~~~~~~~route~~~~~~~~~~~~~~~~~~~~\n");
xdbg("~~~~~~~~~ xdbg - route~~~~~~~~~~~~~~~~~~~~\n");
xlog("L_ALERT","~~~~~~~~~ xlog - route~~~~~~~~~~~~~~~~~~~~\n");