OS X neagent nesessionmanager Logging Levels

Hi,


I am testing IKEv2 with OS X 10.11.4 Beta (15E27e) and can see neagent and nesessionmanager log entries in the /var/log/system.log when using the Console app.


Is there way to increase the level of detail of the neagent and nesessionmanager log entries - i.e. to move from a standard logging level to a diag logging level ?


Many thanks in advance.

Replies

Is there way to increase the level of detail … ?

Yes there is. This is controlled by the

LogLevel
preference in the
com.apple.networkextension.control
domain. There’s also a
LogToFile
preference that causes these entries to be written to a file. The standard procedure we send to folks who report a bug against Network Extension framework is:
$ defaults write /Library/Preferences/com.apple.networkextension.control.plist LogLevel 6
$ defaults write /Library/Preferences/com.apple.networkextension.control.plist LogToFile 1
$ # Reproduce the problem
$ /System/Library/Frameworks/SystemConfiguration.framework/Resources/get-mobility-info
$ defaults write /Library/Preferences/com.apple.networkextension.control.plist LogLevel 5
$ defaults write /Library/Preferences/com.apple.networkextension.control.plist LogToFile 0
$ # Attach the .tar.gz file produced by get-mobility-info to the bug

Assuming you’re not actually filing a bug, you should adapt this to meet your specific requirements.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

Many thanks for the information of how to increase the log details in OS X.


Is there a similar capability for iOS? Perhaps a Network Extension debugging profile?


Many thanks in advance.

Is there a similar capability for iOS? Perhaps a Network Extension debugging profile?

Exactly. Alas, I don’t think the bugs folks have made it public. You could ask them to do so.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

Eskimo: I love the command:

/System/Library/Frameworks/SystemConfiguration.framework/Resources/get-mobility-info


But how do you get these commands to work on Sierra?

  1. $ defaults write /Library/Preferences/com.apple.networkextension.control.plist LogLevel 6
  2. $ defaults write /Library/Preferences/com.apple.networkextension.control.plist LogToFile 1
  3. $ defaults write /Library/Preferences/com.apple.networkextension.control.plist LogLevel 5
  4. $ defaults write /Library/Preferences/com.apple.networkextension.control.plist LogToFile 0


I able to open the Console and see all the NETWORKEXTENSION system messages, but can't find a way to programatically export them or have them all logged to a file.


Any help would be so appreciated. Thank You.

macOS 10.12 (and the other 2016 OS releases) have adopted a new logging system. You should watch WWDC 2016 Session 721 Unified Logging and Activity Tracing for some general background to this system.

This change has had an impact on pretty much every OS subsystem that logs, including Network Extension. You can find the latest instructions for enabling Network Extension on the Bug Reporting > Profiles and Logs page.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

Here is the Output of the Console that is not written to any Log FIle that I am requesting. Thank You for your Response Eskimo.


* "Bug Reporting > Profiles and Logs page. just rehashes my original question with a script that is what I posted"

$ sudo defaults write /Library/Preferences/com.apple.networkextension.control.plist LogToFile -boolean true

$ sudo defaults write /Library/Preferences/com.apple.networkextension.control.plist LogLevel -int 7

$ /System/Library/Frameworks/SystemConfiguration.framework/Resources/get-mobility-info


* " Unified Logging and Activity Tracing " Is just a video with a broken reference ilnk.


Let’s continue this on the thread you created for it, eh?

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"