cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
113
Views
1
Helpful
6
Replies
Highlighted
Cisco Employee

Java Package Log location in NCS local install

I am trying to locate the log written by the JAVA package I have loaded in NCS which is installed in local mode.  Following is the log I am trying to write for my debug. I have compiled the package and reloaded it in NCS. But I am not able to locate the log file in which this log is written.

LOGGER.debug("  DEVICE: " + dev.getName() + " type: " + type);

System.out.println("  DEVICE: " + dev.getName() + " type: " + type);

1 ACCEPTED SOLUTION

Accepted Solutions
Cisco Employee

Re: Java Package Log location in NCS local install

Perhaps you can check to make sure your package is loaded correctly.

show packages package <package name>

6 REPLIES 6
Cisco Employee

Re: Java Package Log location in NCS local install

First your logs files are located in your project directory in the logs. Java logging also always winds up in logs/ncs-java-vm.log. Also by default, NCS logs INFO log messages and above, so you will have enable debug level logging for your application. Perhaps you can provide some information regarding your local installation

Cisco Employee

Re: Java Package Log location in NCS local install

Thanks for your comments. Yes, I see all the log fine in the ncs-run directory. And I have configured my package log level to level-all. But I couldn’t find my log in any of the logs located in the ncs-run directory. Following is the log level information. Let me know if you need any more information.

show java-vm     

stdout-capture {

    file ./logs/ncs-java-vm.log;

}

java-logging {

    logger com.example.vfirewall {

        level level-all;

    }

    logger vfirewall {

        level level-all;

    }

}

Cisco Employee

Re: Java Package Log location in NCS local install

I am still not able to get the logs from my package. Is it possible for someone to take a look at  my environment to see what’s going on here.

Cisco Employee

Re: Java Package Log location in NCS local install

Perhaps you can check to make sure your package is loaded correctly.

show packages package <package name>

Cisco Employee

Re: Java Package Log location in NCS local install

Package is loaded fine. I'm able to request the service from the package. Issue is only with log.

Cisco Employee

Re: Java Package Log location in NCS local install

Okay, you will have to supply your service NCS package you’ve developed for me to provide any more insight into why you can’t write to the log.

Content for Community-Ad
August's Community Spotlight Awards