DotnetLog.Cli 0.1.1

There is a newer version of this package available.
See the version list below for details.
dotnet tool install --global DotnetLog.Cli --version 0.1.1
                    
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
                    
if you are setting up this repo
dotnet tool install --local DotnetLog.Cli --version 0.1.1
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=DotnetLog.Cli&version=0.1.1
                    
nuke :add-package DotnetLog.Cli --version 0.1.1
                    

dotnet-log

Adds call logging to an application that is already built. No source code, no rebuild: the tool opens the .dll files lying next to the application, writes a call to the logger into the beginning and the end of every method, and puts the logger next to them.

Run it without installing anything (.NET 10 and above):

dnx DotnetLog.Cli -- "MyCompany.*" --dir C:\app

Or install it as a global tool and call it by name:

dotnet tool install -g DotnetLog.Cli
dotnet-log "MyCompany.*" --dir C:\app

The first arguments are masks of assembly names — which files to open at all. Everything that does not match a mask is left untouched, so the framework and other people's packages stay out of the log unless you ask for them.

Then start the application as usual. Every call goes into a JSONL log: one line per event, with the arguments, the returned value, the duration, the thread and the id of the calling method, so the whole call chain can be rebuilt later.

{"ts":"2026-08-28T02:18:13.9170918Z","ev":"enter","type":"Humanizer.NumberToWordsExtension","sig":"String ToWords(Int32, CultureInfo)","args":{"number":42},"id":1,"pid":0,"root":1,"d":0,"th":6}
{"ts":"2026-08-28T02:18:13.9273952Z","ev":"exit","ms":10.3,"ret":"forty-two","id":1}

Useful keys — the full list is in dotnet-log --help:

Key What it does
--dir <folder> where the application lies (default: the current folder)
--include-only <masks> narrow the selection down to certain types
--dry-run show what would be changed and change nothing
--restore put the original assemblies back
-o <file> where to write the log

Every original file is copied into .dotnet-log-backup before it is touched, so --restore always has something to restore from.

Settings can be changed at start time, without processing the assemblies again, through environment variables: DOTNET_LOG_PATH, DOTNET_LOG_FLUSH_MS, DOTNET_LOG_MAX_DEPTH and so on. That is how the log is redirected when the application runs in a container.

The log itself is read by the companion package DotnetLog.Reader: it pairs the "enter + exit" lines, builds the call tree and draws it.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last Updated
0.1.2 53 8/28/2026
0.1.1 43 8/28/2026
0.1.0 49 8/28/2026