Enable OneNote 2013 logging

Untitled-1

I’m trying to develop an MS Onenote add-on. This hard because I’m a web developer with LAMP skills so the world of C#, Visual Studio 2012, COM, Registries, DLLs and installers is all new to me. To make things worse it  seems that Onenote doesn’t qualify for a VSTO and its file format is still closed and binary where all the other office file formats are open and easy to parse.

Anyway, my addin wouldn’t load. So I thought I’d try and enable logging after seeing this post.

I eventually did get it working, of sorts using the following:

Windows Registry Editor Version 5.00
[HKEY_CURRENT_USERSoftwareMicrosoftOffice15.0OneNoteOptionsLogging]
"EnableLogging"=dword:00000001
 "EnableTextFileLogging"=dword:00000001
 "ttidLogObjectModel"=dword:00000001
 "ttidLogObjectModelAddins"=dword:00000001
 "ttidLogIncludeTimeDateStamp"=dword:00000001
 "ttidLogMerge"=dword:00000001
 "ttidLogReplicationConcise"=dword:00000001
 "ttidLogCellStorageClientRequests"=dword:00000000
 "ttidLogNativeReplicator"=dword:00000000
 "ttidLogNotebookDiff"=dword:00000000
 "ttidLogObjectSpaceStoreCell"=dword:00000000
 "ttidLogReplicationScheduler"=dword:00000000
 "ttidLogServerFolderReplicator"=dword:00000000
 "ttidLogSharePointAndWebDAV"=dword:00000000
 "ttidLogEditorsTable"=dword:00000000
 "ttidLogSkyDrive"=dword:00000000
 "ttidLogMultiRoundTripSuspend"=dword:00000000Code language: JavaScript (javascript)

Save out as a .reg and then click on it.

If you don’t see OneNote15.log, rebooting should sort it.

Unfortunately this wasn’t much help to me as the majority of these items are logging user interaction within ON or between ON and SkyDrive. The two ObjectModel ones didn’t seem to do anything…

Note that I’ve set a lot of them to 00000000, this disables them again. Play with them to get best results. You probably want to create a second file with these in to disable logging again:

"EnableLogging"=dword:00000000
"EnableTextFileLogging"=dword:00000000Code language: JavaScript (javascript)

Something else useful came out of this exercise and that was finding a windows equivalent to tail -f.

Fire up Powershell and run the following command on any updating text file, it’ll now update in real time.

Get-Content .OneNote15.log -waitCode language: CSS (css)