cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements

142
Views
1
Helpful
6
Replies
khgrant
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
khgrant
Cisco Employee

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

show packages package <package name>

View solution in original post

6 REPLIES 6
khgrant
Cisco Employee

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 installationFirst 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

khgrant
Cisco Employee

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;

    }

}

khgrant
Cisco Employee

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.

khgrant
Cisco Employee

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

show packages package <package name>

khgrant
Cisco Employee

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

khgrant
Cisco Employee

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.

Create
Recognize Your Peers
Content for Community-Ad