logging.pl 469 B

123456789101112131415
  1. use Kamailio qw ( log );
  2. use Kamailio::Constants;
  3. # Demonstrating the three ways of internal logging.
  4. # Additionally, you have the xlog module...
  5. sub logdemo {
  6. my $m = shift;
  7. log(L_INFO, "Logging without Kamailio:: - import the symbol manually! See use statement...\n");
  8. Kamailio::log(L_INFO, "This is the other preferred way: Include the package name");
  9. $m->log(L_INFO, "The Message object has its own logging function. Rather don't use it ;)");
  10. return 1;
  11. }